Re: doubleclicking in the talbeview header?
Re: doubleclicking in the talbeview header?
- Subject: Re: doubleclicking in the talbeview header?
- From: "Sean McBride" <email@hidden>
- Date: Thu, 18 Nov 2004 22:36:01 -0500
Theodore Petrosky (email@hidden) on Wed, Nov 17, 2004 10:46 said:
>I also have the tableView set up to allow the user to
>double click on a row to get detail info on the
>particular row. Works great. I have a problem with the
>tableViewHeaders. If the user double clicks in the
>header, I get an error:
Ah ha! Something I can answer that no one has beat me to! (finally) :)
As you have seen, your method handling double clicks is also called for
double clicks on the tableview header, I guess its considered a kind of
row. Anyway, in your method, you can call [sender clickedRow], if you
get -1 then you know its the header. My method looks like this:
- (void)handleRowDoubleClick:(id)sender
{
// The sender is the tableview. This message is received if a row
// or table column is double clicked, the latter gives -1
if ([sender clickedRow] != -1) {
stuff...
}
}
--
Erroneous google translation: "To cook with the furnace approximately 15
minutes and to be useful."
_______________________________________________
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