Re: Wheel Start and End
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