ephrem@oakhill.UUCP (Ephrem Chemaly) (12/05/90)
This might be a repost, please excuse the waisted bandwidth if it realy is a repost. --------------------------------------------------------------------------------- I am having problems with the translation tables. I am running X11R4 and Motif 1.0 from MIT on a Sun 3/260, and X11R3 from Apple, and Motif 1.0 from Integrated Computer Solutions on an MacIntosh with A/UX. The probelm is on both machines. The problem: For a widget of the xmPushButtonWidgetClass I am trying to add the XmNhelpCallback to display some help for this push button. In my C code I write: { ... n = 0; HelpCallback[0].callback = HelpProc; HelpCallback[0].closure = (caddr_t)"Help string."; XtSetArg(args[n], XmNhelpCallback, HelpCallback); n++; XtCreateManagedWidget("Name", xmPushButtonWidgetClass, parent, args, n); ... } In the x resource data base file I write: ... *Name.translations: #augment\n\ <Btn3Down>: Help()\n\ <Key>F1: Help() ... Now if I push the 3rd mouse button, or the F1 key I get the help function. But I can not push button 1 and call the XmNactivateCallback function. #augment is acting like #replace. I have also tried, #replace, and #override, they all act like #replace. Has anybody seen that problem, or am I doing something wrong. Please use the address below to reply by e-mail. Thanks in advance, Ephrem A. Chemaly +=========================================================================+ | Motorola Inc. Ephrem A. Chemaly | | 6501 William Cannon Drive West | | Austin, Texas 78735 U.S.A. | | Mail Drop: OE-21 | | (512) 891-2760 | | | | Internal Addr: ephrem@soleil-tx (or at) oakhill!soleil-tx!ephrem | | Internet Addr: ...!soleil-tx.sps.mot.com!ephrem | | UUCP Address: oakhill!soleil-tx!ephrem@cs.utexas.edu | +=========================================================================+
aw@cellar.uucp (Andrew Wason) (12/07/90)
In article <4296@soleil-tx.oakhill.UUCP> ephrem@oakhill.UUCP (Ephrem Chemaly) writes: > { > ... > n = 0; > HelpCallback[0].callback = HelpProc; > HelpCallback[0].closure = (caddr_t)"Help string."; > XtSetArg(args[n], XmNhelpCallback, HelpCallback); n++; > XtCreateManagedWidget("Name", xmPushButtonWidgetClass, parent, args, n); > ... > } Make sure your HelpCallback array is NULL terminated. > [...] #augment is >acting like #replace. I have also tried, #replace, and #override, they all act >like #replace. This is a bug in Motif 1.0. I don't know if it is fixed in 1.1. -------------------------------------------------------------------------------- Andrew Wason Bell Communications Research aw@cellar.bae.bellcore.com Piscataway, NJ bellcore!cellar!aw
lalli@casee.enet.dec.com (12/07/90)
|> |>> [...] #augment is |>>acting like #replace. I have also tried, #replace, and #override, they all act |>>like #replace. |> |>This is a bug in Motif 1.0. I don't know if it is fixed in 1.1. |>----------------------------------------------------------------- |>Andrew Wason Bell Communications Research |>aw@cellar.bae.bellcore.com Piscataway, NJ |>bellcore!cellar!aw |> I experienced the same problem augmenting a PushButton translation table, using both Motif 1.0 and Motif 1.1. So I don't think it's been fixed yet. --- Didier Lalli lalli@casee.enet.dec.com Digital Equipment, Centre Technique Europe S.A.R.L DTN 828-5423 B.P. 129 - Sophia Antipolis Tel. +33 92 95 54 23 06561 Valbonne Cedex - France Fax +33 93 65 41 58