• 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: Jonathan del Strother <email@hidden>
  • Date: Fri, 12 Nov 2004 21:59:42 +0000


On 12 Nov 2004, at 19:46, j o a r wrote:


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?"


Ooooh. Never actually noticed the FAQ before - there's some interesting stuff in there :)
Thanks for the tip


_______________________________________________
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


References: 
 >Reserved outlet names in Cocoa? (From: Jonathan del Strother <email@hidden>)
 >Re: Reserved outlet names in Cocoa? (From: j o a r <email@hidden>)

  • Prev by Date: Cocoa Bindings Clarification
  • Next by Date: Re: Has anyone used xmllib2 in an X-Code project?
  • Previous by thread: Re: Reserved outlet names in Cocoa?
  • Next by thread: Can NSStatusItem contain NSTextField ?
  • Index(es):
    • Date
    • Thread