Re: IBOutlet objects not responding to any messages passed
Re: IBOutlet objects not responding to any messages passed
- Subject: Re: IBOutlet objects not responding to any messages passed
- From: Kyle Sluder <email@hidden>
- Date: Thu, 22 Jan 2009 16:06:50 -0500
On Thu, Jan 22, 2009 at 1:11 PM, Cormac Daly <email@hidden> wrote:
> I had created a custom class for the window controller in Interface Builder,
> but I got rid of it and hooked up all the outlets via File's Owner instead.
> I'm not sure exactly how this worked but it did!
You don't create classes in IB, you instantiate objects. This is a
very important thing to get straight; very often people post to this
list claiming that their objects are not receiving messages they know
are being sent, and the problem is that they have created instances of
those classes inside the NIB but are expecting the messages to be sent
to other objects entirely.
By the default, when an NSWindowController loads a NIB, it makes
itself the File's Owner. You should change the Class of File's Owner
(on the Identity pane of the Inspector) to match.
--Kyle Sluder
_______________________________________________
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