Re: Binding directly to instance
Re: Binding directly to instance
- Subject: Re: Binding directly to instance
- From: Matt Neuburg <email@hidden>
- Date: Tue, 03 Jan 2006 10:57:40 -0800
- Thread-topic: Binding directly to instance
On Tue, 3 Jan 2006 11:14:12 -0500, Jeff LaMarche <email@hidden>
said:
>On several occasions, I've needed to bind directly to a key or action
>of an object instance contained in my nib.
As opposed to what? I mean, what else would you expect to bind to?
>One recent example I can
>think of was to bind the doubleClickTarget of a table view to a
>method of my controller instance (old-fashioned generic controller,
>not an NSController subclass). When I bind to my controller instance,
>it says that model key path is required, but I want it to fire the
>selector right on the object I'm binding to. I tried creating a
>workaround accessor that returned self, but that crashed.
How about if you just type "self" as the model key path in the
doubleClickTarget binding?
>I've run into the same problem with trying to populate NSPopupButtons
>directly from an NSArrayController using the content binding (along
>with contentValues and selectedValue). According to the binding docs,
>you need to bind content to an array controller, but if your array
>controller is an instance in your nib, rather than an attribute or
>iVar of an instance in your nib, it requires you to specify a
>controller key
Namely, the NSArrayController's arrangedObjects? m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
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