Can't set a cursor on a programmatically created window
Can't set a cursor on a programmatically created window
- Subject: Can't set a cursor on a programmatically created window
- From: David Preece <email@hidden>
- Date: Wed, 21 Apr 2010 12:12:06 +1200
Hi,
So, I'm programmatically creating a subwindow:
self=[super initWithContentRect:rect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
attaching a view...
MyView* cView=[[[PlayBarView alloc] initWithFrame:NSMakeRect(0, 0, 0, 0)] autorelease];
[self setContentView:cView];
and then bringing it live...
[[parent window] addChildWindow:self ordered:NSWindowAbove];
[self makeKeyAndOrderFront:self];
I'm asking it to change it's cursor...
[self invalidateCursorRectsForView:[self contentView]];
And was expecting my implementation of resetCursorRects to be called on MyView but it's not. I've called 'areCursorRectsEnabled' on the subwindow and it returns YES. I also have lots of very similar code running in other views for the parent window (which is a 'traditional' IB created window) with no problems at all.
Any pointers towards a cause (or solution) are much appreciated.
TIA,
Dave_______________________________________________
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