Re: Reserved outlet names in Cocoa?
Re: Reserved outlet names in Cocoa?
- Subject: Re: Reserved outlet names in Cocoa?
- From: j o a r <email@hidden>
- Date: Fri, 12 Nov 2004 20:46:14 +0100
On 2004-11-12, at 18.33, Jonathan del Strother wrote:
I just created a class in Interface Builder, and gave it a bunch of
attributes like font, size, color, text...
I generate the code files, connect the attributes to various popup
buttons and color wells and start programming my application. But
things aren't working. For some reason font, size, and color are all
nil.
Much experimentation later, and I find that if I rename the attributes
(fontList, sizeList, colorWell), they seem to work ok.
I can't understand this. The controller class just inherits from
NSObject, which doesn't contain any similarly named attributes that
might perhaps cause problems. So why doesn't an attribute named 'font'
work?
Have you read these sections in the IB FAQ (check under the Help menu
in IB)?
"How are outlets connected at runtime?"
"I have an outlet named "rate" and in the same class a method named
"-setRate:". When my nib is loaded the -setRate: method is called. How
come?"
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden