Can I get a list of selectors delayed with performSelector:withObject:afterDelay:?

Not directly. An easy way to accomplish this is would use NSOperation - then just hold references to the operations you may need to cancel in the future.

Forgot to menton: the code is driving part of the interface, so I have to keep it on the main thread. That's why I didn't throw NSOperation into the mix. – Steve Weller Feb 15 at 20:59 hmmm... seems like you'll have to write something to accomplish this =\ in addition to the options you've mentioned in the OP, you could register with the main run loop (you may have to go to the CF APIs) and then use NSInvocations for the message queue.

Alternatively you may be able to create a wrapper type to group invocations, then use cancelPreviousPerformRequestsWithTarget without the unknown parameters. Finally, these messages could invoke via a custom type which implements isEqual:. Then you can use a customized implementation of isEqual to identify what messages to cancel.

– Justin Feb 16 at 5:15.

I would like to be able to cancel delayed selectors individually. I can do his with NSObject cancelPreviousPerformRequestsWithTarget... but need all the method parameters to do this. At the point where I want to cancel, I don't have them.

Is there a way to get the list of selectors that are delayed together with the parameters used to delay the selectors? The workaround is to just keep track of the parameters, of course. Or to use GCD and make my selectors (now blocks) check to see whether they should immediately return.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions