Re: Changing NSTableView DataSource without glitching
Re: Changing NSTableView DataSource without glitching
- Subject: Re: Changing NSTableView DataSource without glitching
- From: Conor Dearden <email@hidden>
- Date: Thu, 16 Mar 2006 10:09:02 +0100
Corbin is correct you don't have to worry about manipulating the array in
the data source as the table won't reload while your code runs. In fact in
most cases you will have to explicitly tell it [myTableView reloadData].
What you have to watch out for (and from your description what is happening)
is the selection in the table before changing its data, make sure to
deselect any rows that will no longer be within range of the new array.
Throw a [myTableView deselectAll:self]; before [self
setArrayFromWhichDataIsTaken:newArray]; and you will see your problems
disappear.
Conor Dearden
http://www.bruji.com/
_______________________________________________
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