Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!usc!snorkelwacker!paperboy!osf.org!dbrooks From: dbrooks@osf.org (David Brooks) Newsgroups: comp.windows.x.motif Subject: Re: XmNactivateCallback on XmText not being called? Message-ID: <1990Sep21.124423@osf.org> Date: 21 Sep 90 16:44:23 GMT References: <1990Sep20.163058.11712@tse.uucp> Sender: news@OSF.ORG Reply-To: dbrooks@osf.org (David Brooks) Organization: Open Software Foundation Lines: 32 In article <1990Sep20.163058.11712@tse.uucp>, cont1@tse.uucp (Contractor #1 = Tim Horton) writes: |> |> I am having a consistent problem on several platforms with... |> - text widget, |> - XmSINGLE_LINE_EDIT mode, |> - no translations at all |> Editing and selection works roughly as expected, but XmNactivateCallback |> does not get called when the user hits return. Why? This one belongs right at the top of the Commonly Asked Questions list. Your text widget is in a Form, which is a subclass of BulletinBoard, which has stolen the Return event to activate its own default button, even if it doesn't have one. The cure is to add a translation to the text widget any time after it has been created, like this: XtOverrideTranslations(textWidget, XtParseTranslationTable("Return: activate()")); IMPORTANT ANNOUNCEMENT: in everybody's favorite change, this will no longer be necessary in Motif release 1.1. To the disgust of the strict- encapsulation fans, BulletinBoard will let Text or List children see the Return key before it looks at it itself. -- David Brooks dbrooks@osf.org Systems Engineering, OSF uunet!osf.org!dbrooks A Loaf of Bread, a Jug of Wine, and Six Spades Redoubled -- Omar somebody.