Re: Binding problem
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