Re: Bindings and MenuItems
Re: Bindings and MenuItems
- Subject: Re: Bindings and MenuItems
- From: Ben Lachman <email@hidden>
- Date: Thu, 02 Apr 2009 00:59:38 -0400
On Apr 1, 2009, at 5:01 PM, Keary Suska wrote:
On Apr 1, 2009, at 12:31 PM, Ben Lachman wrote:
I mean a "Cocoa bindings" kind of binding. e.g. the "target"
binding of the menu item is bound in IB. The action field of the
binding is set to "print:". I'm not talking about the traditional
way of connecting a button/menu item to another object through the
basic control drag from source to target and select the action
method and I'm not talking about setting it in code. I know how to
do both of those and they work, what I'm going for is a dynamic
target.
I think I wasn't recalling correctly--my issue had to do with an
NSButton, and binding didn't work for me. There is no reason to
suspect that the binding wouldn't work as advertised.
Anyway, I suppose you have verified that the correct object is being
set when the binding is established (and/or when the bound property
changes)?
Yeah, I ended up reverting to just setting the target of the menu item
in code when certain notifications happened (NSWindowDidBecomeKey and
NSOutlineViewSelectionDidChange). This works, but isn't quite as
simple as a bindings based solution should have been. Planning to file
a bug on this.
Thanks for the thoughts.
->Ben
--
Ben Lachman
Acacia Tree Software
http://acaciatreesoftware.com
email: email@hidden
twitter: @benlachman
mobile: 740.590.0009
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden