On Aug 30, 2011, at 1:01 PM, Chris Paveglio wrote: > I am starting to work on an application that must expose 1 Applescript > command. (It's rather challenging to understand and implement.) > I don't understand what is happening with this code: If I have an ivar that > is global in scope, when the Applescript command is accepted, that ivar won't > be used. Why would that be ignored at all? What am I missing here?
I don't understand your question. There is no such thing as "an ivar that is global in scope", and there are no globals, or even statics, in the code that you posted. If you have two different instances of whatever class this is, they'll have distinct userName ivars. If you only have one instance, then userName should only be NULL if you look before applicationDidFinishLaunching is called, or you clear it some time after. Now since you didn't alloc/init, or create it, you should retain it. But even if it's been released, the ivar will have the stale pointer, not null. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com