Re: perform ... afterDelay?
Re: perform ... afterDelay?
- Subject: Re: perform ... afterDelay?
- From: Jeff LaMarche <email@hidden>
- Date: Wed, 4 Jan 2006 09:37:14 -0500
Simplisticly put: (how) can I use that like this:
[self myCounter++ afterDelay:0.04]
You need to create a method that that you can call. It either needs
to take no arguments, or what arguments it does take must be objects
(like NSNumber), so something like this (typed in e-mail, usual
disclaimers, yada yada)
- (void)incrementCounter
{
myCounter++;
}
or
- (void)incrementCounterBy:(NSNumber *)amt
{
myCount+=[amt intValue];
}
Then, you can call these like so:
[self performSelector:@selector(incrementCounter) withObject:nil
afterDelay:0.04];
or
NSNumber *amt = [NSNumber numberWithInt:5];
[self performSelector:@selector(incrementCounter:) withObject:amt
afterDelay:0.04];
Hope that helps...
Jeff
_______________________________________________
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