Issue with creating a Recent Files menu...

Paul Dupuis paul at researchware.com
Tue Dec 1 17:30:23 EST 2015


I have an issue with creating a "Recent Files" menu and I am wondering
if anyone on the list has a work-around:

I do not want to pose any restrictions on files names other than what
the operating system itself does.

So I build a menu of file names. However, special characters in menu
items create accelerator keys, disable menus, set or unset check boxes
and so on:

Dictionary for "menu" excerpt:
The syntax for menu item strings is:
  [<flags>] <label> ['/' <accelerator> ['|' <tag>]]

Where <flags> may include:
  !<c|n|r>   (the menu item has respectively, a check, no check, or a
selected radio button)
  ((the menu item is disabled)
  -(the menu item is replaced with a menu separator)
  multiple tab characters   (where the number of tabs specifes the depth
of the menu item.  Use this to create submenus)

So, since a file name CAN begin with ! or ( or - (but not tab), is there
a way to 'escape' these characters in the menu system so they are
displayed normally? Replacing / with // works to escape a / in the name.
What about the vertical bar "|"?

I tried escaping a ! at the start of a name with /! and that does not work.

Thank you for any answers,




More information about the use-livecode mailing list