Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

To-one relationship in NSOutlineView using bindings



Hi!

I am trying to implement a to-one relationship using a NSPopUpButtonCell on a NSTableColumn. This will be much like the 'Priority' column in mmalc's 'ToDo' Cocoa bindings example.

Working off Apple's documentation at http://developer.apple.com/ documentation/Cocoa/Conceptual/CocoaBindings/Tasks/onerelation.html this should be pretty straightforward. Probably is.

The catch is that the possible values for the relationship will not be the same on each line. I actually want them to be provided by the business object represented by the table's row.

I tried populating the array controller used as values list for the pop-up button by binding its contentArray to a key on my NSTreeController's arrangedObjects. This leads to the following runtime error message: [<_NSControllerTreeProxy 0x390b70> valueForUndefinedKey:]: this class is not key value coding-compliant for the key applicableTypes.

I also tried binding to observedObject.applicableTypes. No joy.

Now I am at a loss. I wouldn't know where else to get access to the current row / NSTreeController item in order to determine the list of values.

TIA for your thoughts.

Pierre
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.