• 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
Implementing an Inspector using Bindings (across multiple NSArrayControllers)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Implementing an Inspector using Bindings (across multiple NSArrayControllers)


  • Subject: Implementing an Inspector using Bindings (across multiple NSArrayControllers)
  • From: email@hidden
  • Date: Mon, 1 May 2006 22:54:27 -0700

Hi all.

I'm getting to the point where I need to implement an inspector in my app.
The only thing holding me up is how to get the "main" selected objects when the currently active selection could be from different arrays.


As an example, I have a canvas style app. This app uses an array of "drawingObjects" to hold its data representation of each object (a line, image, polygon etc.).
With a bindings based inspector, I can do this easily if the there is only being one single array of "drawingObjects" used.
The inspector's bound controlls can just get the selected objects when it changed selection.


But what happens if I have *two* NSArrayControllers that hold "drawingObjects" for different purposes. Maybe I have those in the main canvas, and another
array of "drawingObjects" in a "stencil drawer" that I can drag and drop into my canvas-style app. So how can I get the selection of the "front most" array of
"drawingObjects" to edit them when they're selected?


If I for example changed the key view to be the stencil drawer, how does my inspector know to inspect the other array of "drawingObjects"?
I could use [NSWindow firstResponder] but that wouldn't in a more general (using standard cocoa controls) way allow me to get to the underlying array of objects would it?


Any pointers would be great!

Andre
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


  • Prev by Date: Re: NSWindowController Subclassing - windowDidLoad Method
  • Next by Date: Help with nodesForXPath
  • Previous by thread: Re: NSWindowController Subclassing - windowDidLoad Method
  • Next by thread: Help with nodesForXPath
  • Index(es):
    • Date
    • Thread