• 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: Wheel Start and End
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wheel Start and End


  • Subject: Re: Wheel Start and End
  • From: arri <email@hidden>
  • Date: Fri, 13 Jul 2007 20:23:45 +0200

Does it sound a good idea?

sounds like a fine idea to me..

i'm using a simiar approach for stuff that need to happen each time a custom view is resized, but NOT each time -windowDidResize is fired.. to make the resizing more fluid.


just curious;
why hang yourself in a loop, while you could also just do the initial setting-up in 'mouseDown', the funky stuff in 'mouseDragged', and your final bits in 'mouseUp' ?


hogging the eventloop sounds like a not so good idea to me..

.a

On Jul 13, 2007, at 3:47 PM, Lorenzo wrote:

As you know it's easy to detect when a mouseDragged event occurs, so you can
firstly set some variable then go into your own loop, then set some variable
after the drag ends.


- (void)mouseDragged:(NSEvent*)theEvent
{
    // do some settings here

    while(isOnDragging){
        theEvent = [[self window] nextEventMatchingMask:eventMask];
        ... // if mouseUp break;
    }
    // end of drag, so other settings here
}

Now, I would like to do the same with the scrollWheel.
But I have just an API
- (void)scrollWheel:(NSEvent*)theEvent
and not so many ideas about how to do it. I though to put a timer to check
whether the elapsed time after the last scrollWheel event is more than e.g.
0.5 seconds. If so, I can call the "endOfScrollWheel" event and set some
variables too. Does it sound a good idea?



Best Regards -- Lorenzo email: email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden

-----
Scanned for virus and spam

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Wheel Start and End
      • From: Lorenzo <email@hidden>
References: 
 >Wheel Start and End (From: Lorenzo <email@hidden>)

  • Prev by Date: Re: Objective-C/Cocoa connectivity to Relational Databases
  • Next by Date: NSOutlineView with an image and text
  • Previous by thread: Wheel Start and End
  • Next by thread: Re: Wheel Start and End
  • Index(es):
    • Date
    • Thread