• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Continuous controls: detecting when the last message comes through
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Continuous controls: detecting when the last message comes through


  • Subject: Re: Continuous controls: detecting when the last message comes through
  • From: Jean-François Veillette <email@hidden>
  • Date: Wed, 11 Jul 2001 12:33:09 -0400

oups ...
should read :
[NSObject cancelPreviousPerformRequestsWithTarget:self

selector:@selector(generate:)
object:nil];
[self performSelector:@selector(generate:)
withObject:nil
afterDelay:0.1];
}

- jfv

Le Mercredi 11 juillet 2001, ` 12:12, Jean-Frangois Veillette a icrit :

> A side effects of those slider is that they hold on the event loop,
> they loop in a 'while()' to check for mouse events and move the slider
> accordingly.
>
> In my case, the slider was modifying the model, and the model was
> posting notification about it's changes.
>
> - (void)update:(NSNotification*)notification
> {
> if([window isVisible])
> {
> [NSObject cancelPreviousPerformRequestsWithTarget:self
>
> selector:@selector(print:)
> object:nil];
> [self performSelector:@selector(generate:)
> withObject:nil
> afterDelay:0.1];
> }
> }
>
> This will actualy do the generate: method at the next event-loop. when
> the slider is finished with it's things.
>
> - jfv
>
> Le Mercredi 11 juillet 2001, ` 11:24, Phil Barrett a icrit :
>
>> Is there a way to tell if the action sent by a continuous control
>> (e.g. a
>> slider or scroller) is the final one, caused by the mouse-up?
>>
>> While the user is dragging the slider back and forth, I want to do
>> quick
>> updates to give feedback, but I need to know when the mouse is
>> released and
>> I get a final action, so I can do a slower update of the information.
>>
>> Maybe it's as simple as asking if the mouse button is down when the
>> action
>> is received - but what's the easiest way to do that? I'm already
>> watching
>> the events coming through [NSApplication sendEvent:] but this only
>> sees the
>> mouse down that started the drag, so I can't check there.
>>
>> Or is there a way to ask an NSCell it it's currently tracking the
>> mouse?
>>
>> Thanks
>>
>> Phil
>> --
>> Phil Barrett - CTO - Cambridge Animation Systems
>> _______________________________________________
>> cocoa-dev mailing list
>> email@hidden
>> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> _______________________________________________
> cocoa-dev mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >Re: Continuous controls: detecting when the last message comes through (From: Jean-François Veillette <email@hidden>)

  • Prev by Date: Re: Security framework question
  • Next by Date: Java Binaries?
  • Previous by thread: Re: Continuous controls: detecting when the last message comes through
  • Next by thread: Java Binaries?
  • Index(es):
    • Date
    • Thread