Hello,

in a custom view I'm processing -scrollWheel: events for smooth scrolling using the trackpad.

When the user flicks across the trackpad, scrolling events first go through a phase cycle delivered through [NSEvent phase] (NSEventPhaseBegan -> NSEventPhaseChanged -> NSEventPhaseEnded).

After that (depending on how the flick ended physically), the system may deliver additional scrolling events with [NSEvent momentumPhase] set (NSEventPhaseBegan -> NSEventPhaseChanged -> NSEventPhaseEnded).

A typical sequence of events looks like:

phase: NSEventPhaseBegan / momentumPhase: NSEventPhaseNone
phase: NSEventPhaseChanged / momentumPhase: NSEventPhaseNone
[...]
phase: NSEventPhaseChanged / momentumPhase: NSEventPhaseNone
phase: NSEventPhaseEnded / momentumPhase: NSEventPhaseNone
phase: NSEventPhaseNone / momentumPhase: NSEventPhaseBegan
phase: NSEventPhaseNone / momentumPhase: NSEventPhaseChanged
[...]
phase: NSEventPhaseNone / momentumPhase: NSEventPhaseChanged
phase: NSEventPhaseNone / momentumPhase: NSEventPhaseEnded


The trouble is that there seems no way of knowing that there will be momentumPhase events following a "normal" phase cycle. I need to do cleanup but I must be sure scrolling is over before doing it.

The system knows (at the time of sending the final normal -phase event) that it's going to send additional -momentumPhase events. Is there a way to find out?

Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to