Re: Bindings - accessing the model from a seperate window
Re: Bindings - accessing the model from a seperate window
- Subject: Re: Bindings - accessing the model from a seperate window
- From: Dan Price <email@hidden>
- Date: Fri, 13 Jan 2006 15:56:56 +0000 (GMT)
If you could send me your example, that would be
great!
If possible, I would like to be able to do all of this
in IB.
--- Volker Runkel <email@hidden> wrote:
> Hi Dan,
>
> I had a similar problem. In my case I have two
> entities A and B. A
> has a one-to-many relationship to B. I have two NIB
> files. MainMenu
> shows all objects of A. RelatioNib shows all objects
> from B which are
> related to the selected A. In one Nib you can use
> the contentSet
> Binding in BArrayController bind to
> AArrayController.selection.relationfield .
>
> In two Nibs you have to get access to the selection
> of
> AArrayController in MainMenu. I created an IBOutlet
> to
> AArrayController (in MainMenu) and a method - both -
> in my
> ApplicationDelegate . This method (call it
> SelectionControl) is of
> return type NSArrayController and gives a pointer to
> the MainMenu
> Outlet to AArrayController. In my second Nib file I
> can use
>
NSApplicationDelegate.SelectionControl.selection.relationfield.
>
>
> To come to your problem:
>
> You could create such a method in your NSDocument
> subclass, offering
> access to the ArrayController. That you could use in
> your Inspector
> via a binding like:
> ApplicationDelegate.YOURACCESSMETHOD.selection
>
> Bind it to your Inspectors ArrayController (that
> serves your
> Insepctors fields) contentSet.
>
> I can send you an example of my solution, even so it
> is not a
> Document based problem, but it might help.
>
> I assume the whole post is a bit confusing - me not
> speaking english
> natively and not being used to soem idioms, so
> please ask back!
>
>
> Volker
___________________________________________________________
NEW Yahoo! Cars - sell your car and browse thousands of new and used cars online! http://uk.cars.yahoo.com/
_______________________________________________
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