Re: NSTextField will not become editable in a borderless window

2008-05-22 Thread Peter Burtis
Thanks Robert and Graham. FWIW, the one that finally did the trick was overriding canBecomeKeyWindow to return YES, which makes a lot of sense in hindsight. For whatever strange reason, nothing else suggested worked. (This is all happening on a CoreAnimation layer, BTW, which may well be

Re: NSTextField will not become editable in a borderless window

2008-05-22 Thread Graham Cox
Me again ;-) It just occurred to me - have you tried the following overrides in NSWindow?: - (BOOL) canBecomeKeyWindow { return YES; } - (BOOL) acceptsFirstResponder { return YES; } - (BOOL) becomeFirstResponder { return YES; } - (BOOL) resignFirstResponder { return YES; } Borderless windows

Re: NSTextField will not become editable in a borderless window

2008-05-22 Thread Graham Cox
Found it just after I posted: - (BOOL) _hasActiveControls { return YES; } Also, while this works to show an active *appearance* for buttons, pop- ups and so on, I've never tried it with text fields. It's a quick thing to try though. It would be useful for Apple to provide a properl

Re: NSTextField will not become editable in a borderless window

2008-05-22 Thread Graham Cox
Peter, I've run into something similar and I think it has to do with the window server not making a window active (i.e. main and key) if it has the borderless attribute. The workaround I ended up using was to override a private undocumented NSWindow method which controls use to query the ac

Re: NSTextField will not become editable in a borderless window

2008-05-22 Thread Robert Cerny
You need to subclass NSTextField. HTH Robert On 22.5.2008, at 14:13, Peter Burtis wrote: When I add an NSTextField to a borderless window, nothing I do will make it editable. Specifically, running the code below, the text field just won

NSTextField will not become editable in a borderless window

2008-05-22 Thread Peter Burtis
When I add an NSTextField to a borderless window, nothing I do will make it editable. Specifically, running the code below, the text field just won't work. (I've tried it with all backing types, BTW.) NSWindow *window = [[NSWindow alloc] initWithContentRect:NSMakeRect(300,300,300,300) s