Setting MenuButton on openCard

Devin Asay devin_asay at
Tue Aug 7 12:13:58 EDT 2007

On Aug 7, 2007, at 9:58 AM, Mikey wrote:

> I'm trying to use a menu button to display the name of the current  
> card.
> So, I have done the following:
> 1) the text of the button contains the names of all cards
> 2) the button is a group
> 3) In the script for the group is the following
> on openCard
>    set the menuHistory of button "menu" to the number of this card
> end openCard
> However, when I either send openCard or navigate, nothing happens
> visually, i.e. the option menu doesn't change its label, UNTIL I
> manually change it once by clicking on it.  Then it works as expected.
> BEFORE manually changing it, the menuHistory and the label are what I
> would expect them to be, but the display is improper.


This is a long-standing bug. See 
show_bug.cgi?id=4595 and 
show_bug.cgi?id=1097 . The workaround is to script the changing of  
the label as well as the menuHistory, at least the first time. Throw  
some votes their way if you have some.


Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

More information about the use-livecode mailing list