On Sep 23, 2010, at 21:18, Richard Somers wrote:

> I have a NSBox in a portion of a window. The box is used to swap views into 
> the window by setting the content view of the box.
> 
> When a view is swapped in I need to set the cursor but NSBox is changing the 
> cursor out from underneath me. (This even happens when the cursor is not 
> inside the box.)

Is there a scroll view involved anywhere, either enclosing the box or enclosed 
by the box? Scroll views have a tendency to reset the cursor at various 
inconvenient times. (If that's what is happening to you, the solution is to use 
setDocumentCursor: to force the scroll view to use the cursor you want.)

Otherwise, you can try setting a breakpoint on [NSCursor setCursor:] to find 
out what is changing the cursor. This can be tricky to do, since you want to 
avoid stopping at the breakpoint before the scenario you're interested in, but 
it can be done with a little care (and possibly a little debugging code too).


_______________________________________________

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

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

Reply via email to