Re: Confused about bindings and NSTableView
Re: Confused about bindings and NSTableView
- Subject: Re: Confused about bindings and NSTableView
- From: mmalcolm crawford <email@hidden>
- Date: Wed, 8 Dec 2004 10:52:36 -0800
On Dec 8, 2004, at 8:30 AM, Juan Pablo Pertierra wrote:
http://developer.apple.com/samplecode/Fiendishthngs/Fiendishthngs.html
However in this example they access the array directly, and they seem
to add objects to the table with [array addObject:object], which works
when the application is compiled. When i attempted this, the table
wouldn't refresh correctly and i had to implement insertObject:
at<key>AtIndex and removeObjectFrom<Key>AtIndex methods.
The example only uses addObject: during initialisers etc.
Now my table will refresh and items are added, but I get an error:
*** Illegal NSTableView data source (<MyController: 0x3391a0>). Must
implement numberOfRowsInTableView: and
tableView:objectValueForTableColumn:row:
Have you set the data source outlet for the table view?
I don't get it. I can't figure out why in the Apple sample listed
above they can just access the array directly, while my table won't
refresh if I do it.
See above, and "Programmatic modifications to arrays not noticed by
table view" at:
<http://homepage.mac.com/mmalc/CocoaExamples/controllers.html>
I used bindings in the same way. And if I have to implement
numberOfRows... and objectValyeForTable... methods, why use bindings
anyway???
You don't have to implement them.
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden