Re: Opening drawer by default
Re: Opening drawer by default
- Subject: Re: Opening drawer by default
- From: Julien Jalon <email@hidden>
- Date: Sat, 19 Jan 2002 18:29:35 +0100
Le samedi 19 janvier 2002, ` 06:07 PM, Yong Lee a icrit :
Well, yes. Actually, what I mean was, as a beginner, I tried Andy's
suggestion verbatim:
[NSApp performSelector:@selector(open) withObject:MyDrawer
afterDelay:1.0];
and I got "NSApp does not respond to perforSelector:". Only when I
looked up performSelector: I realized it's an NSObject method so I
could do something like this.
[self performSelector:@selector(open) withObject:MyDrawer
afterDelay:1.0];
I think that what this would do is :
[self open:MyDrawer] after a delay of 1 sec.
(and there is also an error in your code since the selector must have
one parameter)
I think you want that:
[MyDrawer open]
so, what you have to do is add a method like "- (void)openMyDrawer:" in
your controller like this one:
- (void)openMyDrawer:sender {
/* sender is useless here but you need one for performSelector */
[MyDrawer open];
}
and do:
[self performSelector:@selector(openMyDrawer:) withObject:self
afterDelay:1.0];
--
Julien Jalon
<
http://software.julien-jalon.org>
--
Julien Jalon
<
http://software.julien-jalon.org>