[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField -becomeFirstResponder / NSTextView -copySelection

From: Nicola Pero
Subject: Re: NSTextField -becomeFirstResponder / NSTextView -copySelection
Date: Mon, 20 May 2002 12:11:59 +0100 (BST)


> Hello Everyone,
> I'm trying improve the NSTextFields firstResponder mechanics. Here is my
> situation: So that a [aWindow makeFirstResponder:aTextField] actually makes
> aTextField firstResponder which accepts input (if aWindow is key of course),
> the NSTextField -becomeFirstResponder must setup the field editor for
> aTextField and select the current text. I tried this by
> invoking -selectText:.

Maybe you should provide us with more details of exactly what you want to
improve ...

Did you notice something in the gnustep implementation of firstResponder
mechanics for NSTextFields which is not the same as on other platforms ?

The current gnustep implementation (which might not be the perfect one or
may not be the same as other implementation) has two different operations

 * You make a textfield the first responder.  That means future keyboard
events for that window will be sent to the textfield.  Done by calling
[aWindow makeFirstResponder: aTextField].

 * You select all the text in a textfield.  Done by calling [aTextField
selectText: whatever].

When you click with the mouse in a textfield, the textfield is made first
responder, but the text in the textfield is not selected.

When you TAB (/shift-TAB) from one textfield to another one, the new
textfield is made first responder AND concurrently the text in the
textfield is selected.

If anything in the implementation is different from other platforms, we
might be willing to change it (or help you change it) provided that you
let us know exactly where the difference is :-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]