Again about NSTableView and NSArrayController bindings
Again about NSTableView and NSArrayController bindings
- Subject: Again about NSTableView and NSArrayController bindings
- From: Michele Barboni <email@hidden>
- Date: Thu, 13 Nov 2008 10:05:00 +0100
Hi,
following Hillegass example (RaiseMan app) I'm trying to populate my
NSTableView with bindings.
I've a custom class, 3 attributes, call it MyCustomClass.
I've an appController, where there's a NSMutableArray (called table)
with instances of MyCustomClass.
I've a NSTableView in IB, 3 columns.
And of course an NSArrayController object in IB.
According to Hillegass here's what I've done:
1) (IB) In Array Controller Attributes, Object Controller, Class:
MyCustomClass and for Key the three names of MyCustomClass attributes.
2) (IB) In Array Controller Bindings, Content Array, Bind to: App
Controller, model key path: table
3) (IB) For each NSTableColumn of the NSTableView: bindings panel,
Bind to: Array Controller, controller key: arrangedObjects, model key
path: the name of the key column should handle.
Now, in an awakeFromNib: my application connect and query a MySQL
database, retrieve entries and store them as MyCustomClass instances,
then call addObject: on the NSMutableArray table.. but nothing appears
in my NSTableView..
What am I missing?
_______________________________________________
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