Re: Changing cursors in window's bounds
Re: Changing cursors in window's bounds
- Subject: Re: Changing cursors in window's bounds
- From: Quincey Morris <email@hidden>
- Date: Fri, 28 May 2010 12:11:30 -0700
On May 28, 2010, at 11:55, John Love wrote:
> My challenge centers on trying to make this magic happen just in the window's canned contentView without creating a custom NSView within Interface Builder. My sub-classed NSDocument knows about the window via my overridden -windowControllerDidLoadNib:(NSWindowController *)aController because its window = [aController window]. Also, I have one Controller (sub to NSObject) which has knowledge of the NSDocument's NSWindow because I pass this window to it.
>
> So, how do I effect cursor tracking just in this window without creating a custom NSView in IB?
A NSTrackingArea has an owner, which doesn't have to be a view, and which receives the tracking area's messages. So just make your window controller or your document the owner.
The only problem is that I have a *vague* recollection that there's something special about the cursorUpdate: message. It might be that this is the only one of NSTrackingArea's generated messages that's sent to the view under the cursor instead of the owner. But I'm likely misremembering, so you should give it a try.
_______________________________________________
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