Re: Key presses in NSView
Re: Key presses in NSView
- Subject: Re: Key presses in NSView
- From: Gordon Apple <email@hidden>
- Date: Thu, 04 Oct 2012 20:30:02 -0600
- Thread-topic: Key presses in NSView
Ah! Exactly what I needed. Works. Thank you. It turns out that I had
another borderless window where I had done just that. How quickly we
forget.
That screen overlay business is a real nasty. I found out real fast that
you don¹t put a break point in its result handler unless you like cold
reboots. Also, the AVScreenShack overlay crashes with ARC unless you use a
delayed invocation to release it. (Nothing like having your object
deallocated while you¹re still unwinding the stack in the middle of one of
its method calls. :-)
On 10/4/12 4:35 PM, "Jens Alfke" <email@hidden> wrote:
>
> On Oct 4, 2012, at 3:17 PM, Gordon Apple <email@hidden> wrote:
>
>> This is essentially the DragMouseBoxView (simple subclass of NSView) from
>> the AVScreenShack sample. It is set to acceptFirstResponder and
>> acceptFirstMouseClick.
>
> You may need to override -canBecomeKeyWindow in your window to return YES if
> it doesn¹t have a regular title bar (NSBorderlessWindowMask) it won¹t become
> key by default.
>
> Jens
>
_______________________________________________
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