• 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: IBOutlet not 'sticking' at runtime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IBOutlet not 'sticking' at runtime


  • Subject: Re: IBOutlet not 'sticking' at runtime
  • From: glenn andreas <email@hidden>
  • Date: Wed, 7 Sep 2005 23:32:57 -0500


On Sep 7, 2005, at 8:43 PM, Adam Raney wrote:

I have created a custom subclass of NSPopUpButton (ACRPopUpButton)
and given it an IBOutlet called target, typed to NSTextField.
Thanks for your help guys but so far no go.

The only custom method the class has (so far), is a getter method that
should just return the NSTextField reference. I have made sure that
"target" is not set programatically either, so it should not be
getting reassigned to nil.

But the problem is that you've made a subclass of NSPopupButton which already has a "setTarget:" method (NSPopupButton is a subclass of NSButton which is a subclass of NSControl, which implements setTarget:).


So when your NIB is loaded and the "wiring" of your target field is being set, "setTarget:" is called which ends up calling NSControl's setTarget: which does something not involving your instance variable at all (leaving it as null)


You'll need to change the name of that instance variable.

Glenn Andreas                      email@hidden
 <http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets

_______________________________________________
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: 
 >IBOutlet not 'sticking' at runtime (From: Adam Raney <email@hidden>)
 >Re: IBOutlet not 'sticking' at runtime (From: Adam Raney <email@hidden>)

  • Prev by Date: Re: Checking if framework exists
  • Next by Date: Tracking Rect problem.
  • Previous by thread: Re: IBOutlet not 'sticking' at runtime
  • Next by thread: Array Controller sort descriptors vs. SQLite data store (was Re: localized compare and SQLite persistent store)
  • Index(es):
    • Date
    • Thread