tags:

views:

18

answers:

1

How do I access the property scrollPhase in an NSEvent of type NSScrollEvent (in OS X 10.6)?

- (void)scrollWheel:(NSEvent *)event {
    NSLog(@"Scroll Event: %@", event);
}

If I write the event to the log, I can see the desired information:

... Scroll Wheel Event: NSEvent: type=ScrollWheel ... scrollPhase=Continue
... Scroll Wheel Event: NSEvent: type=ScrollWheel ... scrollPhase=End
A: 

It's not in the public API. Of course you can access it by calling a Apple private method. If you use private APIs, you should know what you're doing, so I won't spell out how to do that here, other than pointing out how to get the method name: just use the utility class-dump.

Yuji