• 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
NSTrackingArea + cursorUpdate: problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTrackingArea + cursorUpdate: problem


  • Subject: NSTrackingArea + cursorUpdate: problem
  • From: Raphael Sebbe@Google <email@hidden>
  • Date: Wed, 28 Nov 2007 22:41:52 +0100

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


  • Follow-Ups:
    • Re: NSTrackingArea + cursorUpdate: problem
      • From: Nygard Steve <email@hidden>
  • Prev by Date: Re: Refresh problem with right aligned rectangle while resizing anNSOutlineView
  • Next by Date: Re: determining the result of a CAAnimation instance for time 't'
  • Previous by thread: Re: NSTextView and Click on Button
  • Next by thread: Re: NSTrackingArea + cursorUpdate: problem
  • Index(es):
    • Date
    • Thread