Menu Problem!

Lynch, Jonathan bnz2 at cdc.gov
Wed Aug 17 12:36:43 EDT 2005


I have used this sort of construction:

Put "Insert Row Below" into tChoice
Send "menupick tChoice" to button "row options"


And it worked fine, no need to use menuhistory at all. Is there a hidden
danger I am not aware of?



-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Ken Ray
Sent: Wednesday, August 17, 2005 12:25 PM
To: Use Revolution List
Subject: Re: Menu Problem!

On 8/17/05 9:49 AM, "David Burgun" <dburgun at dsl.pipex.com> wrote:

> Hi,
> 
> I have a pop up menu that has two values, call them A and B. In the
> preOpenStack handler I want to set the menu back to A so I tried the
> following:
> 
> send "menuPick A" to button "myButton"

Actually, what you want to do is to set the "menuHistory" to a number
corresponding to the menu item you want selected. So if the menu
displays
"A" as the first item, then "B", you want to do:

  set the menuHistory of button "myButton" to 1

However keep in mind that this does the same thing as actually
*selecting*
the menu item, so if you want to reset the menu, but *not* have it take
effect, you need to wrap the command in "lock messages", like this:

  lock messages
  set the menuHistory of button "myButton" to 1
  unlock messages

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com


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





More information about the use-livecode mailing list