Save your state to the hard drive on shutdown and reload on init?
Jake
julian_salerno wrote:
>
>
> When our (C++) plugins are loaded as dynamic libraries by FileMaker,
> it would appear (from my own debugging) that a new instance of the
> entry-point object (ie. a new instance of 'MyPlugin' class) is created.
>
> I ask this question from the perspective of disabling and then
> re-enabling the plugin.
>
> In my case there is a need to store some state in the plugin (or even
> in a class which the plugin uses). I have tried to introduce a static
> variable, but the variables state is not as I expect it to be after a
> plugin is re-enabled following a disable (indicating a whole new
> instance of the plugin was loaded).
>
> Can anybody confirm this and/or maybe suggest a solution, alternative
> or workaround when trying to store state across enabled/disabled
> plugin states ?
>
> J
>
>
--
Jake Traynham
Owner, CNS Plug-ins
http://www.cnsplug-ins.com/