• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Reserved outlet names in Cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Reserved outlet names in Cocoa?
      • From: Jonathan del Strother <email@hidden>
References: 
 >Reserved outlet names in Cocoa? (From: Jonathan del Strother <email@hidden>)

  • Prev by Date: Scrollbar redraw problem
  • Next by Date: Re: Making NSBrowser more efficient
  • Previous by thread: Reserved outlet names in Cocoa?
  • Next by thread: Re: Reserved outlet names in Cocoa?
  • Index(es):
    • Date
    • Thread