Re: troubles with tableview
Re: troubles with tableview
- Subject: Re: troubles with tableview
- From: Graham Cox <email@hidden>
- Date: Mon, 30 Nov 2009 16:05:48 +1100
On 29/11/2009, at 10:23 PM, Dorimedont Bancescu wrote:
> but when I try to load the data from the disk in
> -(id) initWithCoder:(NSCoder*) encoder I see the NSMutableArray loaded with all data but in
> -(int) numberOfRowsInTableView:(NSTableView*) tableView the array is emtpy and I cannot see nothing in my NSTableView.
Are you sure it's even called? You need to call [table reloadData] at the end of -initWithCoder: to make sure the table is refreshed with the new data.
Also, look up keyed archiving - the non-keyed archiving you are using is not recommended. It's also wise to factor the memory management of the 'persons' property into proper getter and setter methods.
--Graham
_______________________________________________
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