| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Is there any way, using Objective-C calls, to add new keys to an existing instance of NSArrayController?_______________________________________________
I have an NSTableView in which I'd like to be able to allow the user to add an arbitrary number of columns whose value would be bound to keys in a custom class. My plan was to generate new keys automatically (e.g. @"key1",@" key2", ...) and have my custom class provide appropriate values by parsing these keys in valueForKey: . The arbitrary number of columns would correspond to an aribitrary number of object attributes in the custom class
For this scheme to work, I need to be able to add @"key1" to the NSArrayController I'm using to serve my list of objects to the table when a column is added. Such functionality does not seem to be included in the docs for NSObjectController and NSArrayController - anyone know if it is possible?
Obviously my 'arbitrary number of object attributes' would be best modeled as an NSArray instance variable in the custom class. I don' know how you would associate specific elements in the array with the appropriate columns through bindings though. I'm already using bindings in this table and, as this has been working well for me (up to this), would like to stick to this approach if possible.
Thanks for any suggestions,
Rick
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| References: | |
| >Add keys programatically to NSArrayController? (From: Rick Hoge <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.