When your user picks an item from a menu, the rev engine knows that this has happened. It also knows which item was chosen.

So it then sends a message "menuPick" to your menu button, to let it know that a choice has been made, and it puts the name of the chosen menuItem into a parameter which it sends along with the menuPick message. Your menu button must handle this message, and make use of the parameter. So your menu button needs to have a script containing an "on menuPick" handler. You then choose a name for the parameter, it could be "pWhich" or it could be "Dave". So:

on menuPick Dave
-- at this point, "Dave" is a variable containing the name of the menuItem that was chosen

  switch Dave
-- you fill in your switch structure with whatever menuItems you put in your menu, and handle them as you wish
  end switch    
end menuPick

Hope this helps,

Mark

On 18 Feb 2006, at 12:25, Ken Apthorpe wrote:


Thanks Alex

I'll copy and paste that into my Rev tips file, so I remember it's a
parameter name. I still do not understand how pWhich can tell that I've
picked a menu item like Quit (or Open, or anything else).

So, how does a pWhich identify what's been picked? (you see the dimensions
of my ignorance).

Comment for Rev support:
I have to wonder why I had to go to a user forum and rely on helpful others to provide this information. If it's a convention (ie something "everyone" knows, and follows) one can only wonder why it doesn't seem to appear in the Rev dictionary. I did a fairly thorough search, and I supposed it might be a parameter (among other things), so I put in parameter as a search term and scrolled thru the list of parameters, and failed to find it. If it is such
a common convention, how come?
Answer: Everybody knows this...
Reply: No, they don't.... but if you want Rev to be scripting for the rest
of us, you'll have to make it a bit easier to find it out.

Thanks Alex.  As you can see, I have another agenda going here but I
appreciate all the help I can get.  I need lots.

regards
Ken




--
View this message in context: http://www.nabble.com/Main-menu- puzzle-t1145446.html#a3004643
Sent from the Rev Pilgrim's Progress forum at Nabble.com.

_______________________________________________
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

_______________________________________________
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