1 Reply Latest reply: Jun 22, 2010 10:25 PM by Chris Cox RSS

    Global variables in a format plugin

    G_Soucy Community Member

      Hello,

       

      I developped a format plugin under Windows and I am now porting it to the Macinstosh. I found that the global variables dont seem to behave as they do in windows. In windows, they are real global variables that keep they value as long as Photoshop runs. Under the Macintosh, the variables get reset once in a while. It seems that the plugin gets reloaded, probably after each set of events ( ex: if loading a file requires a ReadStart, ReadContinue and ReadFinish event, then the global variables keep their value for these events. On the next file loaded, they are reinitialised to their default value).

       

      This is a bit annoying because I like keeping a few basic states in memory to save time (ex: load an INI file only once) but that does not work on the Mac. Is there something to do to have the same behavior as we have under windows (have the plugin loaded only once or some other way to have global variables keep their values?

       

      Thanks,

       

      Gilbert