Bug in -[NSWindow invalidateCursorRectsForView:] not forcing resetCursorRects?
Bug in -[NSWindow invalidateCursorRectsForView:] not forcing resetCursorRects?
- Subject: Bug in -[NSWindow invalidateCursorRectsForView:] not forcing resetCursorRects?
- From: "Ben Kennedy" <email@hidden>
- Date: Mon, 21 Oct 2002 23:13:30 -0400
- Organization: Zygoat Creative Technical Services
Hi all,
Can somebody please shed light on this:
According to the docs, -[NSWindow invalidateCursorRectsForView:]
"...marks as invalid the cursor rectangles of aView, an NSView in the
receiver's view hierarchy, so they'll be set up again when the receiver
becomes key (or immediately if the receiver is key)."
Indeed, even the docs for -[NSWindow resetCursorRects] indicate that
"...in program code, it's more efficient to invoke
invalidateCursorRectsForView:".
Well, this does not appear to be the case.
My custom view's resetCursorRects: method never gets called following an
explicit [[self window] invalidateCursorRectsForView:self]. The method
only appears to be called after the view is redrawn, either after
scrolling or by an explicit [self setNeedsDisplay:YES] or equivalent.
The result is a pain in the ass trying to force my cursor rects to
update. It appears as if I will have to abandon the prescribed methods
and go back to kludging around with tracking rects and explicit NSCursor
calls.
Can anyone shed on this? Else, I'll open a bug on radar...
thanks,
-ben
--
Ben Kennedy, chief magician
zygoat creative technical services
613-228-3392 | 1-866-466-4628
http://www.zygoat.ca
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.