• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Objective-C question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Objective-C question (From: Chuck Soper <email@hidden>)
 >Re: Objective-C question (From: Fritz Anderson <email@hidden>)
 >Re: Objective-C question (From: Chuck Soper <email@hidden>)
 >Re: Objective-C question (From: j o a r <email@hidden>)
 >Re: Objective-C question (From: Chuck Soper <email@hidden>)

  • Prev by Date: Re: NSTextField and bindings
  • Next by Date: Re: NSSplitView addingSubviews
  • Previous by thread: Re: Objective-C question
  • Next by thread: Re: Objective-C question
  • Index(es):
    • Date
    • Thread