Re: Selector runs only once
Re: Selector runs only once
- Subject: Re: Selector runs only once
- From: Stephane Le Cornec <email@hidden>
- Date: Wed, 03 Sep 2003 12:55:22 -0400
At 23:50 +0200 2003/09/02, Sanri Parov wrote:
Hi everybody,
I've got to deal with a simple table view in a class and I'd like it to
do something when I double click the mouse on it. I thought adding this:
- (void)awakeFromNib
{
[table_gui setTarget:self];
[table_gui setDoubleAction:@selector(mySelector)];
}
but the selector "mySelector" works only if I doubleclick on 'table'
just after the app starts, not if I do something else with the class
which controls 'table'.
I'd like it to run for the entire duration of my application.
What am I doing wrong?
Stupid question: is mySelector a method of the table or its delegate?
I haven't quite mastered those details, but IIRC the runtime will try
to find the selector in the table class. If it doesn't exist it will
try for the delegate. If none of those two exists it will do nothing.
--
Stephane!
email@hidden (Stephane Le Cornec)
+------------------- Made with recycled electrons. --------------------+
| #include <disclaimer.h> Kebekkujin desu. |
+---------<
http://www.starfiredesign.com/starfire/index.html>----------+
_______________________________________________
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.