Re: NIB bug? Outlets = nil
Re: NIB bug? Outlets = nil
- Subject: Re: NIB bug? Outlets = nil
- From: Fritz Anderson <email@hidden>
- Date: Wed, 26 Sep 2007 11:20:27 -0500
On 25 Sep 2007, at 8:39 PM, Loukas Kalenderidis wrote:
I've had this problem on a number of occasions where outlets in a
NIB file that are connected correctly in IB are nil when the NIB is
loaded. What I've found in the past is that if I change the name of
the outlet in the header file, read it back into IB and reconnect
the outlet it works fine. If I change the name back it stops working
again. It's as though the outlet in the NIB is corrupt or something.
Has anybody else seen this problem?
Suppose you have an outlet named "foo."
Do you also have a method setFoo:, that sets a property, and not the
outlet? The NIB loader uses key-value coding, if possible, to connect
outlets. If you have an unrelated setter method, the loader will use
that, and won't change the instance variable directly.
<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSNibAwaking_Protocol/Reference/Reference.html
>
— F
_______________________________________________
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