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 (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

Reply via email to