Re: Won't Applescript command use defined ivars?
Re: Won't Applescript command use defined ivars?
- Subject: Re: Won't Applescript command use defined ivars?
- From: Scott Ribe <email@hidden>
- Date: Tue, 30 Aug 2011 14:06:14 -0600
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
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden