Re: NSArrayController and the ContentArray Binding
Re: NSArrayController and the ContentArray Binding
- Subject: Re: NSArrayController and the ContentArray Binding
- From: Patrick Machielse <email@hidden>
- Date: Mon, 11 Oct 2004 11:55:43 +0200
op 10-10-2004 14:55 schreef Paul Sargent
>
So I think my question is (but maybe my understanding of everything is
>
incorrect), how do I either:
>
>
a) specify a class which is instantiated in the NIB to the contentArray
>
binding? (i.e. what would it's class path be from NSApplication)
>
>
b) specify some class other than File's Owner from the binding
>
inspector panel?
Yes, this is annoying. I don't know why you can't just bind directly to
_any_ instance from the bindings inspector. Someone?
One way to get around this is to use an intermediate NSObjectController:
Nib Instance <-- NSObjectController <-- NSArrayController.
content outlet binding inspector
This way you can do it all in IB. (You could let the Ojbect controller
instantiate the instance)
Your other choice is to create the binding in code. You could subclass
NSArrayController and than add an outlet connected to the nib instance. Then
add code like
[self bind:@"contentArray" toObject:outlet withKeyPath:@"outletArray" ...];
Patrick
---
Hieper Software
w: www.hieper.nl
e: email@hidden
_______________________________________________
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