From: Kenneth J. Davis (jeremyd_at_ctc.net)
Date: Thu Mar 18 2004 - 17:01:20 EST
..
>> Why? IMO, XXX::getApp() should be removed. There is
>> only ever 1 instance of an XAP_Application object.
>> There should not be FV_View::getApp() or
>> GR_Graphics::getApp() methods.
..
>Sure, there is only one instance of the app, but that is not the
issue here. When compiling a graphics plugin, gr_Graphics.cpp has to
>be compiled into the resulting (stand-alone) module, and the linker
>for the plugin module cannot resoves static XAP_App::getApp() to
anything (since it does not live in the compiled files). The plugin
>needs to be given a pointer to the app instance when loaded and use
>that pointer.
I'm confused.
Don't get the Application instance by using a static function
via <class name>::getApp() as only one instance exists.
How else should one retrieve it other than using
XAP_App::getApp()? This works in several plugins for me.
What compiler/linker does this fail with?
Or does the statement above mean don't add/use additional
static functions the are equivalent to XAP_App::getApp() ???
such as the duplicate call that is/was in the frame class.
(Maybe this will make more sense when I've slept and my MUI
isn't chopping messages off after the header ...)
Jeremy
This archive was generated by hypermail 2.1.4 : Thu Mar 18 2004 - 17:03:49 EST