Re: Exception when clicking leftmost header in TableView
Re: Exception when clicking leftmost header in TableView
- Subject: Re: Exception when clicking leftmost header in TableView
- From: Christopher Holland <email@hidden>
- Date: Thu, 11 Apr 2002 10:03:51 -0500
Yes, you'll need to check to see if the clickedRow returns (-1). That is
NSTableView's way of saying that NO row was selected.
I have another follow-up to the previous question that has a bit more
sample code in it for handling this. (Not that I'm saying it's the best
code, mind you. Aren't we ALL learning?).
Christopher
On Thursday, April 11, 2002, at 09:50 AM, Nicola Vitacolonna wrote:
I have noticed the following strange behaviour in a TableView: when
clicking near
the left edge of the leftmost header, the following exception is raised,
which I am not able
to intercept and debug:
2002-04-11 16:36:13.878 MyApp[648] *** -[NSCFArray objectAtIndex:]:
index (-1) beyond bounds (5)
As suggested in a reply to my previous mail ("How to detect single mouse
click in a TableView?")
I setup
[theTable setAction:@selector(handleClickOnTableItem:)];
but my own handleClickOnTableItem is not called when I click over those
two or three leftmost pixels. In every other case it is. (Actually, I
noticed that it is not called when I click near the edges of every
header, but only the leftmost raises the exception, while in the other
cases nothing happens).
Is it a bug or am I missing some check? Should I just ignore the
exception?
Regards,
Nicola
** ** Get my PGP public key at:
** * ** * www.dimi.uniud.it/~vitacolo
** * ** * or finger email@hidden
** * Universita' degli Studi di Udine
* ***icola Vitacolonna
[demime 0.98b removed an attachment of type application/pgp-signature
which had a name of PGP.sig; charset=US-ASCII]
_______________________________________________
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.
_______________________________________________
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.