NSCursor - ignore previous (was incomplete)
NSCursor - ignore previous (was incomplete)
- Subject: NSCursor - ignore previous (was incomplete)
- From: Adam Gerson <email@hidden>
- Date: Sun, 22 May 2011 13:26:48 -0400
I am trying to understand NSCursor better. I have an animation that
takes place in my view and I don't want to allow any mouse or keyboard
interaction while the animation is running. That is easy to do. While
this is happening I want to display some kind of custom "waiting"
cursor which I have been able to do with:
NSCursor *cursor2 = [[NSCursor alloc] initWithImage:[NSImage
imageNamed:@"HourGlass"]
hotSpot:NSMakePoint(1,1)];
[cursor2 set];
I am not sure exactly where this code belongs or how to keep the
cursor set this way. When I begin my animation I set the cursor, but
it very quickly goes back to the "arrow". I believe this is happening
when some of my views are getting redrawn with setNeedsDisplay which
is part of what is happening in the background. Is there any way to
get a custom cursor to stay set even if the view is redrawn and stay
set until I manually set it back?
Thanks,
Adam
_______________________________________________
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