FROM : Marco Binder
DATE : Wed Nov 20 12:23:41 2002
Ondra, I m not sure on this one, but the docs say:
- (BOOL)canBecomeKeyWindow
Returns YES if the receiver can become the key window, NO if it can't.
Attempts to make the receiver the key window are abandoned if this
method returns NO. NSWindow's implementation returns YES if the
receiver has a title bar or a resize bar, NO otherwise.
So I'd guess, it returns NO for a borderless window. If I d take a shot
on this one, I d say you ll have to make it return YES. And here is my
question for you: is it possible to use a category to override a
function? Or do you have to subclass NSWindow?
marco
Am Mittwoch, 20.11.02 um 03:24 Uhr schrieb Ondra Cada:
> On Wednesday, Nov 20, 2002, at 02:33 Europe/Prague, Ondra Cada wrote:
>
>> Well, searching docs I still can't find how to drive the "keyboard
>> focus" programmatically... I've found that I can enquire which element
>> is active using
>>
>> [NSApp accessibilitySetValue:[[view window] firstResponder]
>> forAttribute:NSAccessibilityFocusedUIElementAttribute];
>>
>> but how to *set* the focused element? The
>> NSAccessibilityFocusedUIElementAttribute is not settable -- I've tried
>> :(
>
> Well, seems that
>
> [object accessibilitySetValue:[NSNumber numberWithInt:1]
> forAttribute:NSAccessibilityFocusedAttribute];
>
> works all right, *but* provided that the window is not borderless! It's
> much worse -- in a borderless window even textfields don't work (aren't
> editable)!
>
> I need a borderless window to cover the entire screen though (and using
> a borderless window was the reason it did not work for me): if anyone
> can tell me how to solve this, I'd be quite grateful.
>
> TIA,
> ---
> Ondra Cada
> OCSoftware: <email_removed> http://www.ocs.cz
> private <email_removed> http://www.ocs.cz/oc
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
>
>
--
|\ /| E-Mail: <email_removed> WWW: www.marco-binder.de
| \/ | Telefon: 07531 / 94 19 94 Fax: 07531 / 94 19 92
| |ARCO Snail-Mail: Banater Str. 3 - 78467 Konstanz
BINDER _____________________________________________________
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Wed Nov 20 12:23:41 2002
Ondra, I m not sure on this one, but the docs say:
- (BOOL)canBecomeKeyWindow
Returns YES if the receiver can become the key window, NO if it can't.
Attempts to make the receiver the key window are abandoned if this
method returns NO. NSWindow's implementation returns YES if the
receiver has a title bar or a resize bar, NO otherwise.
So I'd guess, it returns NO for a borderless window. If I d take a shot
on this one, I d say you ll have to make it return YES. And here is my
question for you: is it possible to use a category to override a
function? Or do you have to subclass NSWindow?
marco
Am Mittwoch, 20.11.02 um 03:24 Uhr schrieb Ondra Cada:
> On Wednesday, Nov 20, 2002, at 02:33 Europe/Prague, Ondra Cada wrote:
>
>> Well, searching docs I still can't find how to drive the "keyboard
>> focus" programmatically... I've found that I can enquire which element
>> is active using
>>
>> [NSApp accessibilitySetValue:[[view window] firstResponder]
>> forAttribute:NSAccessibilityFocusedUIElementAttribute];
>>
>> but how to *set* the focused element? The
>> NSAccessibilityFocusedUIElementAttribute is not settable -- I've tried
>> :(
>
> Well, seems that
>
> [object accessibilitySetValue:[NSNumber numberWithInt:1]
> forAttribute:NSAccessibilityFocusedAttribute];
>
> works all right, *but* provided that the window is not borderless! It's
> much worse -- in a borderless window even textfields don't work (aren't
> editable)!
>
> I need a borderless window to cover the entire screen though (and using
> a borderless window was the reason it did not work for me): if anyone
> can tell me how to solve this, I'd be quite grateful.
>
> TIA,
> ---
> Ondra Cada
> OCSoftware: <email_removed> http://www.ocs.cz
> private <email_removed> http://www.ocs.cz/oc
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
>
>
--
|\ /| E-Mail: <email_removed> WWW: www.marco-binder.de
| \/ | Telefon: 07531 / 94 19 94 Fax: 07531 / 94 19 92
| |ARCO Snail-Mail: Banater Str. 3 - 78467 Konstanz
BINDER _____________________________________________________
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Ondra Cada | Nov 20, 02:33 | |
| Ondra Cada | Nov 20, 03:24 | |
| Marco Binder | Nov 20, 12:23 | |
| Ondra Cada | Nov 20, 14:54 | |
| Andreas Mayer | Nov 20, 15:50 | |
| Clark S. Cox III | Nov 20, 20:46 | |
| Marcel Weiher | Nov 20, 22:39 | |
| Sheehan Olver | Nov 20, 22:55 | |
| Ondra Cada | Nov 20, 23:03 |






Cocoa mail archive

