• 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: Binding problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding problem


  • Subject: Re: Binding problem
  • From: mmalcolm crawford <email@hidden>
  • Date: Thu, 20 Jan 2005 12:52:58 -0800


On Jan 20, 2005, at 10:24 AM, Tackel wrote:

Working with bindings I have a textField and button that adds the string in the textField to my ArrayController. That's working fine but when I override addObject method because i need to make some actions with the string (object) that is going to be added to the ArrayController I don't know how to do it, can't I get it from the object passed to the addObject method?
- (void)addObject:(id)object
{
?????
[super addObject: object];
}


I'm afraid it's not clear to me what you're asking. The 'object' parameter to the addObject: method above is the new object that will be added to your array (an instance of whatever is defined as the "Object Class Name" for your array controller). In addObject: you can modify the new object however you wish. You might also, though, consider overriding newObject instead. This method is called for both addObject: and insertObject:. If you need to retrieve information from your user interface to initialise your object, simply add outlets to your controller subclass, just as you would any other controller object.

mmalc

_______________________________________________
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: Binding problem
      • From: Tackel <email@hidden>
References: 
 >Binding problem (From: Tackel <email@hidden>)

  • Prev by Date: Re: How to customize Comand +Q handler
  • Next by Date: Re: Is there any support in Cocoa for stupidly encoded UTF-8 string?
  • Previous by thread: Binding problem
  • Next by thread: Re: Binding problem
  • Index(es):
    • Date
    • Thread