Re: Static variables reset inside CFPlugin code

2012-01-03 Thread Jens Alfke
On Jan 2, 2012, at 6:27 PM, Grandinetti Philip wrote: > But I'm troubled by this solution. If I set debugger break points in the > "Units" library the debugger no longer stops at those breakpoints when called > by the plugin, but it does stop at those breakpoints when called by the main > ap

Re: Static variables reset inside CFPlugin code

2012-01-02 Thread Grandinetti Philip
Hi Jens, Thanks for your patience. I'm getting a better understanding. Also, it helped a bit reading through ... http://developer.apple.com/library/mac/#documentation/developertools/conceptual/MachOTopics and http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/Dyn

Re: Static variables reset inside CFPlugin code

2012-01-02 Thread Jens Alfke
On Jan 2, 2012, at 7:52 AM, Grandinetti Philip wrote: > You raise a fundamental issue that I admit I don't completely understand. > What are the differences between linking against a static library versus a > framework. If I turned all my static libraries into a framework would the > plugi

Re: Static variables reset inside CFPlugin code

2012-01-02 Thread Grandinetti Philip
Hi Steve, You raise a fundamental issue that I admit I don't completely understand. What are the differences between linking against a static library versus a framework. If I turned all my static libraries into a framework would the plugin see the static variables in the framework without h

Re: Static variables reset inside CFPlugin code

2012-01-02 Thread Steve Sisak
At 9:47 AM -0500 1/2/12, Grandinetti Philip wrote: So, I can't really define the static variable pointing to my library in the plugin.It needs to be defined in the library that handles all the SI units. Hi Philip, This is dusting off brain cells that I haven't used in awhile but, assumin

Re: Static variables reset inside CFPlugin code

2012-01-02 Thread Grandinetti Philip
Sorry Jens, I read too quickly. The app is for the physical and engineering sciences, and will perform a least squares fit of experimental data to different physical models.The models for the experimental data will be in the plugins, and the user will likely only need to the load a few of

Re: Static variables reset inside CFPlugin code

2012-01-01 Thread Jens Alfke
On Jan 1, 2012, at 2:21 PM, Grandinetti Philip wrote: > Your suggestions make sense, although... > option (a) doesn't work for me, since the static variables are being used > before the plugin is loaded. They're not options, they're steps. You need to do all of them. If you can't put the va

Re: Static variables reset inside CFPlugin code

2012-01-01 Thread Grandinetti Philip
Hi Chris, I prefer sticking with C for this part of my code. I just assumed that CFPlugin would be less work, but since you suggested CFBundle, I can see that it might be just as easy/hard. What would be the advantages? Either way, I guess I would still have a problem syncing up static varia

Re: Static variables reset inside CFPlugin code

2012-01-01 Thread Chris Hanson
I have to wonder why you're using CFPlugIn in the first place. I strongly recommend using NSBundle and Objective-C for your plug-in architecture, or plain CFBundle and functions & structs if you absolutely must use C rather than objects for your plug-in architecture. -- Chris ___

Re: Static variables reset inside CFPlugin code

2012-01-01 Thread Grandinetti Philip
Thanks Jens. With more experimenting and reading around I've now got a better picture, and your reply confirmed that picture. I think my problem was even trickier, because I defined my static variable (actually a pointer to a array) in a static library linked to the main app, and the plugin

Re: Static variables reset inside CFPlugin code

2012-01-01 Thread Jens Alfke
On Dec 29, 2011, at 12:11 PM, Grandinetti Philip wrote: > I'm loading and creating a CFplugin using Core Foundation and running into a > strange behavior where all the static variables defined throughout my code > get reset to their initialization values when running code inside plugin. If you

Static variables reset inside CFPlugin code

2011-12-30 Thread Grandinetti Philip
I'm loading and creating a CFplugin using Core Foundation and running into a strange behavior where all the static variables defined throughout my code get reset to their initialization values when running code inside plugin. For example, I define a static variable and functions in a file foo.c