Problem with Multiple Level Bindings
Problem with Multiple Level Bindings
- Subject: Problem with Multiple Level Bindings
- From: Keary Suska <email@hidden>
- Date: Tue, 03 Oct 2006 10:50:42 -0600
- Thread-topic: Problem with Multiple Level Bindings
I have an NSTableView displaying a list of info, and I need to allow a user
to double click on an item to open a detailed editing window in a modal
session (must be modal). The detail will include other NSTableViews whose
data can be retrieved from the "source" object--i.e. the object of the
selected row in NSTableView.
My approach:
bind the NSTableView columns to an NSArrayController
bind the content of an NSObjectController to the selection key of the
NSArrayController
the NSTextFields in the detail window are bound to the
NSObjectController
the NSTableViews in the detail are bound to other NSArrayControllers
whose contentArray is bound to the NSObjectController
The problem with this is that when an item is double clicked, the detail
window shows "no selection" in all the fields. I don't know if this has to
do with the modal session, but I imagine that the NSObjectController should
always have a selection.
If I add code to the NSArrayController to manually set the content of the
NSObjectController, everything works fine, but it poses some logistical
problems in other areas so I would rather use a more flexible approach.
I considered removing the NSObjectController completely out of the picture,
but that also poses some logistical issues.
I imagine that this is a common application model (double click list
view->open window detail view), so there should be a reasonable bindings
solution, or am I encountering the boundaries of bindings usefulness?
Thanks,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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