Page 1 of 1

Standalone File Menu Suggestions

Posted: Mon Mar 24, 2014 7:45 pm
by TerryL
I've searched the Forum, User Guide, and LC Lessons for examples of code for a standalone File menu. Menu Builder provides the basic menuPick framework but none of the actual code. I can't find any guidance or examples other than on Jacque's website, http://www.hyperactivesw.com/mctutorial ... Menus.html. Thanks Jacque.

Could some of the forum savants post their favorite File menu for a no-save standalone, a pref/data.txt-save standalone, and a splash-screen standalone?

Here's my idea of a File menu for a no-save standalone. Are these the minimum menuItems as specified by interface guidelines? Should there even be New and Open menuItems?

Code: Select all

on menuPick pWhich  --file menu for a no-save standalone  (msg box: edit the script of btn "File")
   switch pWhich
      case "New"
         answer "Sorry, a new stack cannot be created." with "OK" titled "New"
         break
      case "Open"
         answer "Sorry, an existing stack cannot be opened." with "OK" titled "Open"
         break
      case "Close"
         close this stack
         break
         ----divider
      case "Quit"
         quit
         break
   end switch
end menuPick

Re: Standalone File Menu Suggestions

Posted: Tue Mar 25, 2014 5:13 pm
by jacque
You can omit the New and Open items, they aren't required. The only thing that actually is required in a File menu is Quit/Exit.

The Edit menu should always have basic editing commands and they should enable or disable depending on whether the insertion point is in a field. The Preferences and About menu items are required, at least on Mac, though you can get away with disabling them.

Re: Standalone File Menu Suggestions

Posted: Fri Mar 28, 2014 8:12 pm
by TerryL
Thanks Jacque for the info on a no-save standalone File menu.

Could someone post their favorite File menu code for a pref/data.txt-save standalone or a splash-screen standalone?
Terry