RE: NSTableView and DataSource problem

2009-02-06 Thread Valentin Dan
L MESSAGE. THANK YOU. -Original Message- From: Graham Cox [mailto:graham@bigpond.com] Sent: Friday, February 06, 2009 5:37 PM To: Valentin Dan Cc: Cocoa Developers Subject: Re: NSTableView and DataSource problem Here's a minimalistic datasource that works in many com

Re: NSTableView and DataSource problem

2009-02-06 Thread Graham Cox
Here's a minimalistic datasource that works in many common situations: - (int) numberOfRowsInTableView:(NSTableView*) aTableView { return [myDataArray count]; } - (id) tableView:(NSTableView*) aTableView objectValueForTableColumn: (NSTableColumn*) aTableColumn row:(

RE: NSTableView and DataSource problem

2009-02-06 Thread Valentin Dan
The data source doesn't reload the data in any way ... but it is rather "smarter" than it should as it loads up some images on init (downloading them if necessary) so the creation takes quite some time. But I think I got why the data source getData methods were called so much, it wasn't the table

Re: NSTableView and DataSource problem

2009-02-06 Thread Andy Lee
Can you show some code, in particular for your data source methods? Are you calling reloadData in any of your data source methods by any chance? --Andy On Feb 6, 2009, at 10:10 AM, Valentin Dan wrote: Hi, I'm having difficulties changing the data in the data source for the table view.

Re: NSTableView and DataSource problem

2009-02-06 Thread Graham Cox
On 7 Feb 2009, at 2:10 am, Valentin Dan wrote: Anyway, what's the proper method for updating the data for the list ? I need to change all the data. Currently I'm setting the tableView's data source to "nil", I'm releasing the old dataSource, creating a new one (with the new items) then set

NSTableView and DataSource problem

2009-02-06 Thread Valentin Dan
Hi, I'm having difficulties changing the data in the data source for the table view. The table view keeps updating like crazy and sometimes it crashes my app; or at least I think that's what crashes it. Anyway, what's the proper method for updating the data for the list ? I need to cha