Article View: comp.windows.x
Article #37397Re: Xt Accelerators
From: Gabe Begeddov
Date: Mon, 26 Feb 1990 20:46
Date: Mon, 26 Feb 1990 20:46
35 lines
1668 bytes
1668 bytes
/ hpcvlx:comp.windows.x / John.Hagerman@rx7.ece.cmu.EDU, at.rx7@rx7.ece.cmu.EDU / 11:27 am Feb 25, 1990 /
I'm having trouble getting accelerators to work. What's wrong with
the following code? The intent is to have a Return keypress in the
dialog's `value' widget cause a set()notify()unset() action sequence
in the dialog's `show' widget. I'm using the R3 Athena widgets on a
DS 3100 running Ultrix.
Thanks for any help - John
hagerman@ece.cmu.edu
acc = XtParseAcceleratorTable("<Key>Return:set()notify()unset()");
XtSetArg(arg[0], XtNaccelerators, (XtArgVal) acc);
XtSetValues(cmd, arg, 1);
XtInstallAccelerators(val, cmd);
XtRealizeWidget(top);
XtAppMainLoop(ac);
}
----------
The problem seems to be the merge mode used.
XtInstallAccellerators will merge the accelerators using
augment semantics unless there is an explicit "#override"
directive in the accelerators string. Try:
acc = XtParseAcceleratorTable("#override <Key>Return:set()notify()unset()");
Gabe Beged-Dov
Interface Technology Operation
Hewlett-Packard
---------------
"Home of the Motif Lite Widget-Brewery"
Technical Details
Message-ID:
<100920176@hpcvlx.cv.hp.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!ucsd!ucsdhub!hp-sdd!hp-pcd!hpcvlx!gabeReferences:
<9002251927.AA13834@rx7.ece.cmu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!ucsd!ucsdhub!hp-sdd!hp-pcd!hpcvlx!gabe From: gabe@hpcvlx.cv.hp.com (Gabe Begeddov) Newsgroups: comp.windows.x Subject: Re: Xt Accelerators Message-ID: <100920176@hpcvlx.cv.hp.com> Date: 26 Feb 90 20:46:12 GMT References: <9002251927.AA13834@rx7.ece.cmu.edu> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 35