On Wed, Jun 10, 2009 at 9:34 PM, John Ku<john.c...@gmail.com> wrote:
> Good afternoon all,
> Im having trouble setting the correct first responder / key window in my
> app.
>
> I have a subclass NSWindow with NSBorderlessWindowMask and a custom drawing
> NSView inside the window. So the window is transparent showing the NSView's
> drawing. The NSView image is drawn with NSDrawThreePartImage to create a
> resizable window.
>
> The problem is this: if i have an instance of NSTextField created within the
> NSView or NSWindow, the text field is selectable with mouse but does not
> accept keyboard events.
>
> I have my NSView set acceptsFirstResponder & becomeFirstResponder to return
> YES but still no dice.

By default, an NSWindow created with NSBorderlessWindowMask cannot
become the key window and thus cannot accept keyboard events. Subclass
NSWindow and override -canBecomeKeyWindow and it should work better
for you.

Mike
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to