View previous topic :: View next topic |
Author |
Message |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sat May 31, 2014 4:13 am Post subject: Characters to avoid in menu text? |
|
|
It seems there are some characters that you shouldn't use in the text of a menu label.
I found that the ":" character would toss up an error.
Does anyone else know of any other characters to avoid in the menu texts?
~Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Sat May 31, 2014 7:26 pm Post subject: |
|
|
What version of VDS? VDS 6 uses : as a separator between <name>:<text>. _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sun Jun 01, 2014 12:00 am Post subject: |
|
|
LiquidCode wrote: | What version of VDS? VDS 6 uses : as a separator between <name>:<text>. |
Using VDS 6 and no it doesn't use ":" as the separator in the menu.
DIALOG ADD,MENU,<menu name>,<item name>;<shortcut key>;<bitmap>|<item 2>
DIALOG POPUP,<item name>;<shortcut key>;<bitmap>;<disabled>;<checked>|<item 2>
Which is why it threw me for a curve ball when the error occurred. _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Last edited by Garrett on Sun Jun 01, 2014 5:20 pm; edited 1 time in total |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Sun Jun 01, 2014 11:20 am Post subject: |
|
|
It does. I've used it. From the help file
<item name> specifies the name and text of the menu item. It takes the form <name>:<text> where <name> and its separating colon are optional. Menu items do not usually have names. If <name> is omitted then a <text>MENU event is generated when the menu item is clicked. If <name> is specified, then the event will be <name> instead. If a menu item is named then it is possible to change the menu item text and enable/disable it using the DIALOG SET command. (Tip: Choose a name ending in MENU for menu items.) _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sun Jun 01, 2014 5:14 pm Post subject: |
|
|
What I pasted as examples also came from the help file, at least the VDS 6 Help file. I don't remember about prior versions use of the menu.
Just checked the VDS 5 help file and no colon for the sep in VDS 5. _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
Back to top |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sun Jun 01, 2014 5:24 pm Post subject: |
|
|
LOL, I see now where in the VDS 6 Help file is shows and says the colon to separate menu label and it's name from each other instead of just using it's name as the label.
Interesting, in all my years I never noticed that you could give a menu item a separate name from it's event label.
Learn something new every day _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
Back to top |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Tue Jun 03, 2014 3:13 am Post subject: |
|
|
Well, whatever the colon char is suppose to do, it doesn't do, except to toss up an error. I think it's a bug and that the help file is in error. _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Tue Jun 03, 2014 11:05 am Post subject: |
|
|
I have used that successfully in a few programs to sep the menu item and menu name. It does not like being in a variable though. If I use a variable with a : in it and try to use that in a menu I get an error. _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Tue Jun 03, 2014 4:56 pm Post subject: |
|
|
are you using it for the menu bar menu or a popup menu?
The two examples I posted are what I use and they work.
Can you post a working example so I can paste it into VDS 6 here and try it?
This isn't holding me back on what I'm doing, but man, this has me scratching my skull. _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Tue Jun 03, 2014 5:18 pm Post subject: |
|
|
This works for me. Clicking on File in the menu bar or popup both go to :FileNameMenu lable
Code: |
DIALOG CREATE,New Dialog,-1,0,240,160
REM *** Modified by Dialog Designer on 6/3/2014 - 13:15 ***
DIALOG ADD,MENU,MENU1,FileNameMenu:File
DIALOG ADD,BUTTON,Popup,58,83,64,24,Popup
DIALOG SHOW
:evloop
wait event
%e = @event()
goto %e
:close
stop
:FileNameMenu
Info It Works!!
goto evloop
:PopupButton
Dialog popup,FileNameMenu:File
goto evloop
|
_________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Wed Jun 04, 2014 2:28 am Post subject: |
|
|
Well I'll be.. Yuppers, that does work. Not sure why it wouldn't work correctly for me when I tried it. I even added the shortcut key and an image and it worked.
Thanks for setting me straight on it.
~Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
|
Back to top |
|
|
|