On Jul 9, 2011, at 8:32 PM, William Squires wrote: > On Jul 8, 2011, at 9:49 PM, Ken Thomases wrote: > >> On Jul 8, 2011, at 8:16 PM, William Squires wrote: >> >>> I've got the UI laid out, including the NSTableView (for displaying the >>> NSDictionarys in the NSMutableArray, NSTextFields for each individual >>> column (so that when you select a row, that row's info shows up in the >>> NSTextField's, and one NSSearchField (not implemented yet.) >> >> I assume you mean that the table columns use NSTextFieldCell as their cell >> type. Right? >> > No, I mean that the window contains NSTextFields and an NSTableView. When a > row is selected in the table view, the corresponding values in each column > also appear in the NSTextFields so the user (me) can edit them. > The table view (cells) is/are not editable, nor is there any intention of > making the cells editable, just like you wouldn't make the cells in a > UITableView (root view controller) editable - touching would expand them > (push another edit view controller) to another view where the user can edit > the info. If the edited info is something that the root view controller loads > into the cell, then when the view controller is done, and popped off, then > the root view controller will [<container> reloadData] to redisplay, instead. > A good example is the Contacts.app on an iPhone/iPod Touch. > In this case (the MacOS X app I'm making), there is no extra view; the info > is simply displayed in the NSTextFields (configured as editable text fields, > not labels), along with two NSButtons (configures as check boxes), and an > NSComboBox (to select time zone the store is in) above the NSTableView.
Well, the table view must have some sort of cells to display its contents. So what I previously wrote would apply to those. With these separate controls, you have what's often called a master-detail interface.[1] You can bind those controls to the array controller, with a key path of @"selection.<property>". So, as the selection within the table view is changed, it will adjust the selection that's tracked by the array controller, which will result in the detail controls being updated. Regards, Ken [1] http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaBindings/Tasks/masterdetail.html _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com