Mario.Wolczko at Eng.Sun.COM
Thu Apr 7 09:12:06 UTC 1994
>Sorry to bother you with trivia, but is there an easy way to define the 'tab'
>key to print, for example, a few spaces?
In 'traits textField insertCode:String' there is a dispatch done on
keystrokes. It shouldn't be difficult to extend this and add a method
to insert the requisite number of spaces.
PS How I found this: point at the border of any text editor (not at
the text). Hit F1 -- this will bring the text editor object into the
world. The methodView (or something similar) of the text editor is
the object that represents the text area (as opposed to the border or
buttons) and does the actual editing; this has a parent (directly or
indirectly) called traits textField. In there is a method called
keyPress:String:, which calls insertCode:String:.
Voila! (Literally, "isn't the screen cluttered?").
More information about the Self-interest