forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Characters to avoid in menu text?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sat May 31, 2014 4:13 am    Post subject: Characters to avoid in menu text? Reply with quote

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
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Sat May 31, 2014 7:26 pm    Post subject: Reply with quote

What version of VDS? VDS 6 uses : as a separator between <name>:<text>.
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sun Jun 01, 2014 12:00 am    Post subject: Reply with quote

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
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Sun Jun 01, 2014 11:20 am    Post subject: Reply with quote

It does. I've used it. From the help file Wink

<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
View user's profile Send private message Send e-mail Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sun Jun 01, 2014 5:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sun Jun 01, 2014 5:24 pm    Post subject: Reply with quote

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 Smile

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Tue Jun 03, 2014 3:13 am    Post subject: Reply with quote

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
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Tue Jun 03, 2014 11:05 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Tue Jun 03, 2014 4:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Tue Jun 03, 2014 5:18 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Wed Jun 04, 2014 2:28 am    Post subject: Reply with quote

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. Smile

~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
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Wed Jun 04, 2014 10:55 am    Post subject: Reply with quote

No prob. Happy to help! Razz
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group