dynamically adding NSTableColumns while using bindings
dynamically adding NSTableColumns while using bindings
- Subject: dynamically adding NSTableColumns while using bindings
- From: "Paul Gribble" <email@hidden>
- Date: Wed, 1 Aug 2007 16:17:48 -0400
So I have figured out from the various demo code, etc, how to use
KVC-compliant setters and getters in myDocument.m, which enables me very
easily, with very little code, to implement a NSTableView, use bindings to
bind each NSTableColumn to an NSArrayController, and bind each
NSArrayController to an NSMutableArray instance variable in myDocument.m.
Here's my question: What if I want the user to be able to dynamically add or
remove columns? How do I set things up using bindings so that when the user
clicks "add column", a new column appears, is bound to a new nsarray
controller, which is turn bound to a new NSMutableArray in myDocument.m? I
guess what I need in myDocument.m is an NSMutableArray (or maybe
NSMutableDictionary?) that in turn stores NSMutableArrays, one for each
NSTableColumn? But then I'm at sea when it comes to how to set this all up
with bindings.
Thanks,
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden