Re: Binding & other actions
Re: Binding & other actions
- Subject: Re: Binding & other actions
- From: J Nozzi <email@hidden>
- Date: Fri, 28 May 2004 15:02:14 -0400
Thanks Jim and Mmalc. I subclassed the controller and overrode add /
remove. Works beautifully. As I explained to Mmalc off-list, I really
don't know why I didn't think to do that.
I was stubbornly expecting something in the bindings panel to handle
this. It'd be nice to have an auxiliary selector and a conditional
selector built-in to the bindings to negate the need for subclassing.
- J
On May 28, 2004, at 2:58 PM, James DiPalma wrote:
connected to an NSArrayController's add: and remove: actions
add:/remove: are actions and are unrelated to bindings.
Unfortunately, I've been struggling to figure out how to add 'other
actions' to that event as well. Specifically, I'm trying to add an
"are you sure?" to the remove button prior to removing. I'm also
trying to perform additional checks on the 'add' button.
This kind of behavior change has more to do with inheritance than
bindings or with Cocoa; if you want to override what they do, you can
subclass NSArrayController (or instantiate a new controller). By
overriding NSArrayController's add:, you can do your checks, put up UI
if you want, and then call NSArrayController's add: method.
-jim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.