Path: utzoo!attcan!uunet!husc6!cs.utexas.edu!po From: po@cs.utexas.edu (Po Ling Cheung) Newsgroups: comp.windows.x Subject: Re: Problems with Athena Text widget Keywords: Athena Text Widget Message-ID: <3908@cs.utexas.edu> Date: 10 Nov 88 21:49:04 GMT References: <3874@cs.utexas.edu> <7876@bloom-beacon.MIT.EDU> Organization: U. Texas CS Dept., Austin, Texas Lines: 36 In article <7876@bloom-beacon.MIT.EDU> kit@athena.mit.edu (Chris D. Peterson) writes: >... >As far as emulating this behavior in the Athena text widget, I don't think >it is possible to get exactly the behavior that you want. Although putting >the widget in append-only mode may help. Sorry, but you won't be able to delete anything in append-only mode. The following modification to defaultTranslations[] would allow insertion and deletion only at the very end of text: Delete: my-delete() delete-previous-character() \n\ Return: end-of-file() end-of-line() newline()\n\ : end-of-file() end-of-line() insert-char()\n\ : end-of-file() end-of-line() \ insert-selection(PRIMARY, CUT_BUFFER0)\n\ my-delete() repositions the caret to the end of text, and checks the last character in the text string; if it is not to be deleted, my-delete() inserts a blank, so that the next deletion will not delete the last character we want. BTW, I think it is easier to emulate an "asciiTerminal" widget with the HP TextEdit widget using motionVerify and modifyVerify. Until HP can come up with a set of widgets that run on R3, I would have to stick to the Athena widgets. Does anynoe have more comments on how the two widget sets, Athena and HP, compare with each other? Thanks Chris, Also thanks to Miles O'Neal for his comments. Po