Re: Objective-C question
Re: Objective-C question
- Subject: Re: Objective-C question
- From: j o a r <email@hidden>
- Date: Tue, 4 May 2004 20:54:19 +0200
On 2004-05-04, at 20.19, Chuck Soper wrote:
>
It makes sense that your can't reference self because the function is
>
not part of a class, eh?
Right, C doesn't have classes as it's not an OO language.
>
Something like this works fine:
>
AppPrefs *appPrefs = [[[NSApp delegate] appModel] appPrefs];
In this case you're not referencing any object, or instance variable,
so that would work. You're accessing a singleton object (NSApp is a
shorthand for [NSApplication sharedApplication], available via a class
method - that has a global scope.
j o a r
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.