On Mar 23, 2006, at 10:15 AM, Dr. Robert E. Ball wrote:

When using the browser pointer, I go to the menubar of my OS X stack, click on a menu item, e.g. File, and then click on one of the dropdown items in
the menu, e.g. Save in the File menu. In the message watcher, I get

MouseDown  -- I clicked on File
cREVGetsUpdate
MenuPick   -- I clicked on Save
whichMenu

when it works properly. However, on another stack it doesn't work. I only
get

mouseDown
cREVGetsUpdate
menuPick


No whichMenu. ??? I don't know where to look to find out where the problem is located. I searched the PDF manual and Googoled whichMenu. No luck. Does
anyone know where whichMenu is described?

It looks like a passed parameter variable is showing up in the message watcher. When you write a menuPick handler you normally want to include a parameter variable after the handler name, like this:

on menuPick whichMenu
  switch whichMenu
    case "Open"
      # do open stuff
      break
    case "Quit"
      # do quit stuff
      break
  end switch
end menuPick

The parameter variable holds the name of the menu item that was chosen. It can be any valid variable name, but many rev programmers use the convention in which parameter variables begin with p, eg. pWhich or pTheThingTheyChoseOnTheMenu. You really need to capture this passed argument in order to make the menu behave the way you want. If it's not captured in a variable then the menuPick handler likely will not work.

HTH

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to