Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTrackingArea + cursorUpdate: problem



Hi,

I am trying to use the new cursor handling mecanism of Leopard.

My view has some regions (rects) inside of it where the cursor should be changed, otherwise should be a regular arrow.

1. From the doc, it is unclear to me if NSTrackingCursorUpdate can be used or not in that case (rect != bounds). At least what I get is the cursorUpdate: method being invoked both when entering AND leaving the area. Which means the cursor never becomes an arrow again inside that view.
How should this be handled ?


2. Also the doc states that NSTrackingArea can overlap in different views. What about overlapping in the same view ?


Here is the code ----


trackingArea = [[NSTrackingArea alloc] initWithRect:[self thresholdRect:i]
options: (NSTrackingCursorUpdate | NSTrackingActiveInActiveApp)
owner:self userInfo:nil];
[self addTrackingArea:trackingArea];



-(void)cursorUpdate:(NSEvent *)theEvent { NSLog(@"event : %@", theEvent); [[NSCursor crosshairCursor] set]; }

Thanks,

Raphael
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.