• 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: Please help a newbie with delegation!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please help a newbie with delegation!


  • Subject: Re: Please help a newbie with delegation!
  • From: Nick Zitzmann <email@hidden>
  • Date: Fri, 25 Feb 2005 12:18:16 -0700


On Feb 25, 2005, at 11:26 AM, Adam Wainwright wrote:

I have implemented the code below with nothing else. In the init() method I have used setDelegate:self to act as delegates to the NSTextFields and I have then just created dummy routines to grab the output and just say they are doing stuff.

Nothing is called.

I have also tried to ctrl-drag a link in IB from the text boxes to the AppController class and connect 'delegate'.

I guess this is a stupid question: where am I going wrong?

The objects are nil, and any message sent to a nil object is discarded. IBOutlets aren't connected at init time; they're connected when the nib is instantiated. If your class implements the method -awakeFromNib, then that method will be called when the instantiation process is done.


Also, text fields use a different set of delegate methods than the ones you're trying to use; look at the documentation for NSControl to see the methods you should implement.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________
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: 
 >Please help a newbie with delegation! (From: Adam Wainwright <email@hidden>)

  • Prev by Date: Re: Releasing what's in an array?
  • Next by Date: Re: Releasing what's in an array?
  • Previous by thread: Please help a newbie with delegation!
  • Next by thread: Re: Please help a newbie with delegation!
  • Index(es):
    • Date
    • Thread