• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bindings - accessing the model from a seperate window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bindings - accessing the model from a seperate window


  • Subject: Re: Bindings - accessing the model from a seperate window
  • From: Volker Runkel <email@hidden>
  • Date: Fri, 13 Jan 2006 15:45:56 +0100

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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: Bindings - accessing the model from a seperate window
      • From: Dan Price <email@hidden>
References: 
 >Bindings - accessing the model from a seperate window (From: Dan Price <email@hidden>)

  • Prev by Date: Re: Bindings - accessing the model from a seperate window
  • Next by Date: Re: Ligatures - or more so not ligatures
  • Previous by thread: Re: Bindings - accessing the model from a seperate window
  • Next by thread: Re: Bindings - accessing the model from a seperate window
  • Index(es):
    • Date
    • Thread