Re: NSTableView reloadData question
Re: NSTableView reloadData question
- Subject: Re: NSTableView reloadData question
- From: Andy Lee <email@hidden>
- Date: Wed, 10 Apr 2002 18:01:42 -0400
At 2:55 PM -0400 4/10/02, Bill Cheeseman wrote:
But if I first run the dataSource array through a filter to empty it,
reloadData doesn't work, and the new object does not appear. Using the
debugger, I can see the new object in the dataSource array, but reloadData
fails to invoke the dataSource's tableView:objectValueForTableColumn:row:
method.
Does it invoke -numberOfRowsInTableView:, and if so, is it getting a
1 back? If so, then something is *really* weird. If not, maybe the
outlet to the table view delegate has gotten broken, or you are doing
something too early that you should be doing in -awakeFromNib. Have
you checked that the table view's delegate is what you think it is
just before the call to -reloadData?
My filter uses removeAllObjects to empty the dataSource array, and it then
calls reloadData to display the empty table. At this point, the filtered
dataSource looks identical in the debugger to the original empty dataSource,
and the empty table view looks the same in both situations.
Is there any chance that in your filter you are inadvertently
creating a separate array instance, or a separate dataSource
instance, so something isn't pointing to what you think it's pointing
to?
One last straw to grasp at: have you tried sending
-noteNumberOfRowsChanged to the NSTableView, to see if it has any
effect?
--Andy
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.