yt07+@ANDREW.CMU.EDU (Yin-Cheng Tsai) (09/10/88)
Trouble !!! Ralph told me last time to use my own function to override the internal default "InsertNewline" procedure. However, the textWidget just got stuck when I tried to override the definition of RETURN key. Could anybody point out the error in my program? (If I didn't use 'XtOverrideTranslations', it was O.K. But I can't get the string input.) Your help is highly appreciated. -- tsai ======== excerpt from my program ========= * * * static XtActionsRec act_table[] = { {"m_InsertNewline", quit} }; * * * * main() { TextWidget text; * * --- procedure to create a AsciiStringTextWidget --- XtAddActions (act_table, ONE); XtOverrideTranslations (text, XtParseTranslationTable ( "Ctrl<Key>M: m_InsertNewline() \n\ <Key>0xff0d: m_InsertNewline()")); * * XtRealizeWidget (text); * * * } static XtActionProc quit(w, event) TextWidget w; XEvent *event; { _exit(0); /* A test statement -- will be changed */ }