menuHistory and menuPick
J. Landman Gay
jacque at hyperactivesw.com
Mon Jan 10 21:45:04 EST 2005
On 1/10/05 4:25 PM, Chris Sheffield wrote:
> I have an option button for which I am setting the menuHistory like:
> set the menuHistory of btn "Level" to tLineNum
> And then there's a menuPick handler in the button's script that performs
> additional tasks. But the menuPick handler doesn't always fire. Does
> anyone know of any reason why setting the menuHistory of a button would not
> cause a menuPick message to be sent as well? The above script is called
> during preOpenCard, and, like I said, the menuPick handler is in the script
> of the button. It seems that the only time it fails is when I very first
> come into the card. If I do a "send preOpenCard" after that, menuPick is
> sent normally. Any ideas?
Are you running a script that locks messages before it goes to the card?
That would prevent the handler from triggering. Does the rest of the
preOpenCard script run?
If that's not it, then you could just call the menupick message directly
to be safe. During preOpenCard:
set the menuHistory of btn "Level" to tLineNum
send "menupick (line tLineNum of btn level)" to btn "level"
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the Use-livecode