Master-Detail interfaces, Multiple Documents, and floating windows
Master-Detail interfaces, Multiple Documents, and floating windows
- Subject: Master-Detail interfaces, Multiple Documents, and floating windows
- From: Ron Aldrich <email@hidden>
- Date: Fri, 8 Sep 2006 15:17:49 -0700
Or, How to implement two levels of indirection in a Master-Detail
interface?
I'm working on an image editing application that uses a Master-Detail
interface to control the alterations made to an image.
Currently, the interface is placed on the same window as the image,
and binds to an array controller (TransformationController) contained
in the same .nib file as the document window. There is an
NSTableView which is used to select between transformation layers,
which is bound as follows:
Binding: content
Bind To: TransformationController (NSArrayController)
Controller Key: arrangedObjects
Model Key Path:
Binding: selectionIndexes
Bind To: TransformationController (NSArrayController)
Controller Key: selectionIndexes
Model Key Path:
I would like to move that interface to a floating window, which
displays the interface for the current document, but I can't figure
out how to bind it.
In my MainMenu.nib, I have a document controller
(ImageDocumentController), which descends from NSDocumentController.
I also have a Panel window which contains an NSTableView, which is
bound as follows (this doesn't work - even though there are no error
messages in the run log, the NSTableView never gets updated).
Binding: content
Bind To: ImageDocumentController
Controller Key:
Model Key Path: currentDocument.transformationController.arrangedObjects
Binding: selectionIndexes
Bind To: ImageDocumentController
Controller Key:
Model Key Path:
currentDocument.transformationController.selectionIndexes
In both cases, the Controller Key field is disabled within Interface
Builder.
Comparing the two interfaces, you can see that one uses the
controller key, while the other uses the model key path, but I don't
see any other way to wire it.
Does anyone have any suggestions as to what I'm missing?
Thanks,
Ron Aldrich
Software Architects, Inc.
_______________________________________________
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