• 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: Application Menu - Preferences
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Application Menu - Preferences


  • Subject: Re: Application Menu - Preferences
  • From: Graham Cox <email@hidden>
  • Date: Thu, 25 Feb 2010 09:58:02 +1100

On 25/02/2010, at 9:39 AM, Gabriel Fernandez wrote:

> Okay, I'm a skeptical person, so I have to ask why isn't there a "preferences" method in the FirstResponder IB object to begin with?
> But more to the point, how do I get a reference to the application delegate instance?
>

First Responder isn't a real object - it's a proxy for the "responder chain" and in fact as a target its value is nil.

Since there are several solutions to implementing preferences (including none), having a declared "-preferences:" action method has no value.

The application delegate is a real object, but you have to create it by adding it to the nib and connecting it up to the 'delegate' outlet of the application. Typically you do that by subclassing NSObject and so drag an NSObject icon into the nib and changing its class to the name of your subclass.

--Graham


_______________________________________________

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

  • Follow-Ups:
    • Re: Application Menu - Preferences
      • From: Gabriel Fernandez <email@hidden>
References: 
 >Re: Application Menu - Preferences (From: Gabriel Fernandez <email@hidden>)

  • Prev by Date: Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .
  • Next by Date: Re: Looking for info on anti-piracy and trial-mode techniques for my app . . .
  • Previous by thread: Re: Application Menu - Preferences
  • Next by thread: Re: Application Menu - Preferences
  • Index(es):
    • Date
    • Thread