Re: More bindings confusion
Re: More bindings confusion
- Subject: Re: More bindings confusion
- From: Gwynne <email@hidden>
- Date: Fri, 16 Jul 2004 02:37:39 -0400
On Jul 16, 2004, at 12:34 AM, Scott Anguish wrote:
for example, in a basic Cocoa Document application the Main.nib's
file owner is the instance of NSApplication. The Document.nib's owner
is the NSDocument subclass. There is no reason that you couldn't load
a nib and set a bindings
compliant controller (or model object) as the owner (and thus the
File's Owner).
So if I bind a view's "enabled" binding to Shared Application using the
model key path "delegate.kvcCompliantMethod", and implement
kvcCompliantMethod in the NSApplication delegate, it will work, but I
lose... what?
Bindings are values, not actions. You can't actually trigger single
or double actions on an NSTableView with bindings. You can bind an
Action Invocation for Button and NSButtonCell, but not NSTableview
selections.
I can see where Action Invocation would be useful for NSTableView
though... if you think so, file an enhancement request at
bugreporter.apple.com
The fact that it can't be done is exactly my point :). Neither the
standard target/action for NSControl nor NSTableView's doubleAction can
be accessed with bindings. For that matter, you can't access
doubleAction with traditional outlets and connections either; it has to
be done from code. This isn't the only missing binding in IB; any
NSButton should have an Action Invocation binding, but you can't access
it for a checkbox or radio button. The power of bindings is being
sabotaged here. I can hope this is fixed in Tiger, but in the meantime
I'm going to file a bug.
rdar://3730518
-- Gwynne, key to the Code that runs us all
Email: email@hidden
Web:
http://musicimage.plasticchicken.com/
_______________________________________________
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.