Re: Query: IBOutlet fails if setter method of same name exists
Re: Query: IBOutlet fails if setter method of same name exists
- Subject: Re: Query: IBOutlet fails if setter method of same name exists
- From: Vince DeMarco <email@hidden>
- Date: Mon, 13 May 2002 10:00:17 -0700
On Monday, May 13, 2002, at 09:27 AM, ruffnex wrote:
Hi,
Consider the following:
IBOutlet id foobar; // where foobar outlet is connected to foobar object,
e.g. CheckBox button
-(void)setFoobar:(BOOL)boolean; // a method I want to use from within my code
On running the above code, foobar is nil. It's not connected! If the method is renamed, so it doesn't look like a standard setter, than foobar is connected to a real NSButton. Strange behaviour eh?
Perhaps I've missed something obvious - would appreciate someone shedding some light on this. Apologies if it's blatantly obvious, but it's something that caused me hours of pain (and perhaps to others as well).
This behaves as designed, unfortunately this isn't documented very well.
vince
_______________________________________________
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.