the selector is always performed because you don’t cancel it when the mouse is 
let up in < 1 second.

that’s the missing part.

you need to remove the call.

check almost any iPhone touch stuff that does double taps for an example.

On Feb 1, 2010, at 5:19 PM, Eric Gorr wrote:

> I am actually not sure how to pause the execution while holding the mouse 
> button down.
> 
> It appears there is a delay...the delay I specified in 
> performSelector:withObject:afterDelay: ... however, the selector is always 
> performed.
> 
> 
> On Feb 1, 2010, at 5:15 PM, Richard Penwell wrote:
> 
>> Might try pausing execution after the mouse down to see what's preventing 
>> the run loop from pumping.  PerformSelector... puts an event on the run 
>> loop, so it must not be getting to future events.  When you let your finger 
>> off the mouse, the selector is performed with no delay correct?
>> 
>> On Feb 1, 2010, at 5:11 PM, Eric Gorr wrote:
>> 
>>> Strange, I just replied to Richard saying that my selector is not performed 
>>> until after the mouse button goes up. I can hold the mouse button down for 
>>> several seconds and not see the selector performed.
>>> 
>>> Of course, this may actually be due to the fact that my core event loop is 
>>> based around ReceiveNextEvent rather then a pure Cocoa event loop. Perhaps 
>>> that is what is interfering....
>>> 
>>> Might be headed to DTS for this one...
>>> 
>>> On Feb 1, 2010, at 5:05 PM, Gustavo Pizano wrote:
>>> 
>>>> Eric Hi, What Richar said its what Im actually doing to achieve such a 
>>>> behaviour, using the performSelectorAfterDelay, will be your best shot but 
>>>> what I do is that if the mouse goes up you just call the the NSObject 
>>>> method cancelPreviousPerformRequestsWithTarget. then the selector will not 
>>>> be performed.
> 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to