Good afternoon List!
I'd like to add a menu item to a custom made menu in the Data Editor AND the Viewer AND the Syntax Editor. Since I need to pass a (single string) parameter into my function, I thought I'd have to go with the Custom Dialog Builder (CDB). For just the Data Editor, that works reasonably. A problem, though, is that I can't seem to assign an access key via the CDB: in the Menu Editor one can write "&New Solution" which will show as "New Solution" ("N" = underlined) that can be accessed by [alt] + [n]. But via the CDB, I just see "&New Solution" without the possibility of the [alt] + [n] combination. Second problem: I don't see how I can add my "New Solution" to the Menus of the Syntax Editor + Viewer. Is there any solution or workaround for this? I'm on SPSS version 20.0.0.2. |
The CDB does not support access keys, because
this can pose some difficulties. Assigning a key could preempt a
key assignment in either built-in dialogs or other custom ones, and the
developer of a dialog will usually not know what other custom dialogs might
be installed. That's not a fatal objection, but since the menus would
show an underlined key that in some cases would not work, we have been
hesitant to do this.
Older Windows technology works by supporting multiple presses of the hot key to navigate, but Java does not support that. Regards, Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] new phone: 720-342-5621 From: sergio_da_silva <[hidden email]> To: [hidden email], Date: 02/18/2013 09:42 AM Subject: [SPSSX-L] Custom Dialog Builder not cooperating with Menu Editor Sent by: "SPSSX(r) Discussion" <[hidden email]> Good afternoon List! I'd like to add a menu item to a custom made menu in the Data Editor AND the Viewer AND the Syntax Editor. Since I need to pass a (single string) parameter into my function, I thought I'd have to go with the Custom Dialog Builder (CDB). For just the Data Editor, that works reasonably. A problem, though, is that I can't seem to assign an access key via the CDB: in the Menu Editor one can write "&New Solution" which will show as "New Solution" ("N" = underlined) that can be accessed by [alt] + [n]. But via the CDB, I just see "&New Solution" without the possibility of the [alt] + [n] combination. Second problem: I don't see how I can add my "New Solution" to the Menus of the Syntax Editor + Viewer. Is there any solution or workaround for this? I'm on SPSS version 20.0.0.2. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Custom-Dialog-Builder-not-cooperating-with-Menu-Editor-tp5718118.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Thanks for your reply Jon!
But I don't understand the issue you bring up. With the menu editor I can create custom menus and assign shortkeys to them. If some shortkey is already taken, I can't use it. Instead I get the error that the key has already been assigned to a different (level 0) menu. So I have to choose a different one. So for the menu editor, I simply wrote down all exisiting shortkeys from the three main windows and chose an available one for my custom menu ("alt" + "n" was free for all windows). Couldn't the same procedure be implemented for the CDB? |
It would be possible to prevent assignments
of hot keys that conflict with the built-in menu items, although even there
there are some issues, since users may be licensed for different options,
but there is no way to know what other custom dialogs might be installed.
So one custom dialog could steal the hot key assigned to another
one.
The only way to make this work robustly would be for the hot key to be assigned dynamically when the dialog is installed rather than when it is created. That has some complications, but it might be considered for a future release. Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] new phone: 720-342-5621 From: sergio_da_silva <[hidden email]> To: [hidden email], Date: 02/20/2013 04:02 AM Subject: Re: [SPSSX-L] Custom Dialog Builder not cooperating with Menu Editor Sent by: "SPSSX(r) Discussion" <[hidden email]> Thanks for your reply Jon! But I don't understand the issue you bring up. /With the menu editor/ I can create custom menus and assign shortkeys to them. If some shortkey is already taken, I can't use it. Instead I get the error that the key has already been assigned to a different (level 0) menu. So I have to choose a different one. So for the menu editor, I simply wrote down all exisiting shortkeys from the three main windows and chose an available one for my custom menu ("alt" + "n" was free for all windows). Couldn't the same procedure be implemented for the CDB? -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Custom-Dialog-Builder-not-cooperating-with-Menu-Editor-tp5718118p5718141.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Free forum by Nabble | Edit this page |