Re: NSData, CFData maximum length question

2012-03-21 Thread Grandinetti Philip
gth); CFMutableDataRef data = CFDataCreateMutable(kCFAllocatorDefault, length); CFDataSetLength(data, length); } - Philip On Mar 21, 2012, at 10:26 PM, Jens Alfke wrote: > > On Mar 21, 2012, at 6:00 PM, Grandinetti Philip wrote: > >> it crashes with the error message below

NSData, CFData maximum length question

2012-03-21 Thread Grandinetti Philip
I am confused about different behavior I'm seeing with CFData and NSData.If I create a new project in XCode 4.3.1 as a Core Foundation command line tool, and enter the code below... #include int main(int argc, const char * argv[]) { CFIndex length = (1ULL << 30); fprintf(stderr, "le

Re: NSMatrix, NSForm - addRow - why above and not below?

2012-03-13 Thread Grandinetti Philip
Thanks Keary, It all makes sense.Deceptive is the word "below" in the reference guide, which I usually interpret using the direction of gravity. Philip On Mar 13, 2012, at 1:49 PM, Keary Suska wrote: > On Mar 13, 2012, at 8:55 AM, Grandinetti Philip wrote: > >&

NSMatrix, NSForm - addRow - why above and not below?

2012-03-13 Thread Grandinetti Philip
I'm running into a strange behavior with NSForm (and also NSMatrix). (1) Using interface builder (in Xcode 4.3.1) I place an NSForm in a window. I add a NSButton and wire it to an IBAction that sends addRow to the NSForm. - (IBAction) addRow:(id)sender { [form addRow]; [form sizeToCells];

Re: Static variables reset inside CFPlugin code

2012-01-02 Thread Grandinetti Philip
called by the plugin, but it does stop at those breakpoints when called by the main app. Makes me think I have two copies of code for my static units library running after the plugin is loaded. Does that make sense? Philip On Jan 2, 2012, at 1:22 PM, Jens Alfke wrote: > > On

Re: Static variables reset inside CFPlugin code

2012-01-02 Thread Grandinetti Philip
thout having to do all the Xcode linking magic? Thanks, Philip On Jan 2, 2012, at 10:26 AM, Steve Sisak wrote: > 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 de

Re: Static variables reset inside CFPlugin code

2012-01-02 Thread Grandinetti Philip
to my SI Units library in such a situation? Thanks again, Philip On Jan 1, 2012, at 9:49 PM, Jens Alfke wrote: > > 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 stati

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 Grandinetti Philip
ou know where I can read more about implementing option (c) or other suggestions I would be grateful to hear about it. Thanks, and happy new year! Philip On Jan 1, 2012, at 3:42 PM, Jens Alfke wrote: > > On Dec 29, 2011, at 12:11 PM, Grandinetti Philip wrote: > >> I'm lo

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