T.R | Title | User | Personal Name | Date | Lines |
---|
835.1 | | LEOVAX::TREGGIARI | | Wed May 24 1989 21:32 | 5 |
| This is just a guess, since I don't have the documentation handy, but
have you tried "Ctrl<Key>z" (i.e. lower-case "z")?
Leo
|
835.2 | Wild guess time | 30790::ROSE | | Wed May 24 1989 21:35 | 4 |
| Another wild guess: Is w a window widget? Once upon a time they had a
bug whereby, since they didn't have any translations to start with, you
couldn't augment their translations.
|
835.3 | | 6240::FARMER | | Thu May 25 1989 11:56 | 4 |
| re .1 Ctrl<Key>Z is the same as Ctrl<Key>z
re .2 I'm using Override, not Augment
|
835.4 | | 2520::TREGGIARI | | Thu May 25 1989 13:07 | 13 |
| If "k_command_window" is a toolkit command window widget, then you are
going about this wrong. It's not the command window's translations that
you want to affect, but one of its children. Command window has a
DwtNtTranslation resource to allow you to do this.
You need to do something like:
XtParseTranslationTable ("#override\n Ctrl<Key>z:exit_proc()"));
and use the result as the value of the DwtNtTranslation resource.
Leo
|
835.5 | translation resource was the answer | 6240::FARMER | | Thu May 25 1989 14:16 | 16 |
| Wow! the Translation resource did the trick. thanks very much!
XtSetArg (arglist[0], DwtNtTranslation,
XtParseTranslationTable ("#override Ctrl<Key>z:exit_proc"));
XtSetValues (w, Arglist, 1);
Now I'm curious why this doesn't work from UIL? but I'm glad at
least the other way works.
m_exit_button : push_button {
arguments {
accelerator_text = 'Ctrl/Z';
button_accelerator = '#override Ctrl<KeyPress>z:';
label_label = 'Exit';
};
|
835.6 | | 2520::TREGGIARI | | Thu May 25 1989 16:21 | 9 |
| > button_accelerator = '#override Ctrl<KeyPress>z:';
Accelerators don't support the "#override" syntax. Try taking that out.
You may already know this, but you also must call XtInstallAccelerators
or XtInstallAllAccelerators to get "button_accelerator"s to work.
Leo
|
835.7 | why XtInstallAccelerators? | 6240::FARMER | | Thu May 25 1989 20:25 | 32 |
| thanks, Leo.
I'm learning slowly. could you answer a few more questions
about accelerators?
If I define button accelerators in UIL, why do they have to be
recompiled at runtime via XtInstallAccelerators?
Also, why do I get the following errors? This comes from defining
button_accelerators in UIL and not calling XtInstallAccelerators.
X Toolkit Warning: Overriding earlier translation manager actions
X Toolkit Warning: Overriding earlier translation manager actions
X Toolkit Warning: Overriding earlier translation manager actions
X Toolkit Warning: Overriding earlier translation manager actions
X Toolkit Warning: Overriding earlier translation manager actions
X Toolkit Warning: Overriding earlier translation manager actions
X Toolkit Warning: Overriding earlier translation manager actions
X Toolkit Warning: Overriding earlier translation manager actions
X Toolkit Warning: Overriding earlier translation manager actions
X Toolkit Warning: Overriding earlier translation manager actions
X Toolkit Warning: Overriding earlier translation manager actions
X Toolkit Warning: translation table syntax error: Unknown modifier name: DWTGADGETACCELERATOR
X Toolkit Warning: translation table syntax error: Unknown modifier name: DWTGADGETACCELERATOR
X Toolkit Warning: translation table syntax error: Unknown modifier name: DWTGADGETACCELERATOR
X Toolkit Warning: translation table syntax error: Unknown modifier name: DWTGADGETACCELERATOR
X Toolkit Warning: translation table syntax error: Unknown modifier name: DWTGADGETACCELERATOR
X Toolkit Warning: translation table syntax error: Unknown modifier name: DWTGADGETACCELERATOR
X Toolkit Warning: translation table syntax error: Unknown modifier name: DWTGADGETACCELERATOR
X Toolkit Warning: Overriding earlier translation manager actions
X Toolkit Warning: Overriding earlier translation manager actions
X Toolkit Warning: Overriding earlier translation manager actions
|
835.8 | | 2520::TREGGIARI | | Thu May 25 1989 21:18 | 9 |
| I'm afraid Mike Collins is the toolkit "accelerator" expert, not
I. You need to install the acclerator on the widget(s) which will
have input focus while you want the accelerator to be active.
I don't know why you would get those errors if you don't "install"
the accelerator...
Leo
|