Re: Strange NSTable notification error
Re: Strange NSTable notification error
- Subject: Re: Strange NSTable notification error
- From: j o a r <email@hidden>
- Date: Sun, 1 Dec 2002 21:52:56 +0100
When you get a row number for the selected row in a table view you need
to check that it is ">=0", because the table view can return "-1" to
indicate that no row is selected. It's in the docs.
j o a r
On Sunday, Dec 1, 2002, at 21:24 Europe/Stockholm, Demitri Muna wrote:
I am getting an error that I have not been able to explain. I have an
NSTable, and when my application starts it enters a single row. When I
select the row, I get this error:
2002-11-23 16:51:34.256 MyApp[775] Exception raised during posting of
notification. Ignored. exception: *** -[NSCFArray objectAtIndex:]:
index (-1) beyond bounds (1)
It seems harmless - nothing behaves unexpectedly. In the table's
delegate, I do have an implementation of tableViewSelectionDidChange: ,
but the exception is posted before a single line of the method is
executed.
After that, I can select and deselect the row with no errors.
Does this make sense to anyone?
_______________________________________________
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.