Path: utzoo!attcan!uunet!husc6!bloom-beacon!earth.cray.COM!jlf From: jlf@earth.cray.COM (John Freeman) Newsgroups: comp.windows.x Subject: Text Widget Question Message-ID: <8812222359.AA01387@thelake.cray.com> Date: 22 Dec 88 23:59:26 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 40 Question: Given the following text translation table and arguments to an AsciiStringWidget, why do I get the *default* Text translation table? I know this is happening because I do not execute my routine roll_proc on a newline, and text editing occurs like page 21 of the Athena Widget manual. char roll_translations[] = "\ Right: forward-character() \n\ Left: backward-character() \n\ Down: next-line() \n\ Up: previous-line() \n\ Delete: delete-previous-character() \n\ BackSpace: delete-previous-character() \n\ Linefeed: newline-and-indent() \n\ Return: roll_proc() \n\ : insert-char() \n\ : focus-in() \n\ : focus-out() \n\ : select-start() \n\ : extend-adjust() \n\ : extend-end(PRIMARY, CUT_BUFFER0) \n\ : insert-selection(PRIMARY, CUT_BUFFER0) \n\ : extend-start() \n\ : extend-adjust() \n\ : extend-end(PRIMARY, CUT_BUFFER0) \ "; /* * various declarations here to make it all compile */ static Arg roll_arg[] = {{XtNheight,(XtArgVal)50}, {XtNwidth,(XtArgVal)564}, {XtNstring,(XtArgVal) roll_buff}, {XtNlength,(XtArgVal)1024}, {XtNeditType,(XtArgVal)XttextEdit}, {XtNtranslations, (XtArgVal) roll_translations}, {XtNtextOptions,(XtArgVal)scrollVertical| scrollOnOverflow}}; roll_box=XtCreateManagedWidget("roll_input",asciiStringWidgetClass, box,roll_arg,XtNumber(roll_arg));