Menu Buttons

Bob Sneidar bobs at twft.com
Wed May 11 11:30:33 EDT 2011


I checked this yesterday with 4.6.1. If I issue menuhistory from the message window to a button with the current choice. menupick does NOT get sent. I know this because I put a breakpoint at the start of the menupick handler in that button and nothing happened. However, if I physically select the same choice that is already selected I DO get a menupick message. 

Bob


On May 10, 2011, at 10:08 PM, Mark Wieder wrote:

> Pete-
> 
> Tuesday, May 10, 2011, 8:40:34 PM, you wrote:
> 
>> Hmmm, well I just tried it and got no menuPick when I set the menuHistory to
>> its existing value (running 4.6.0.)
> 
> Here's the issue: setting the menuHistory of menu buttons would work,
> but *only* if a new value was being set (not the same as the current
> value). So the fix was to trigger the menuPick message when the
> menuHistory command was issued irregardless of the current value of
> the menu button.
> 
> That's working now. I just tried it again to make sure, with both
> pulldown and option menus.
> 
> script of button 1:
> on mouseDown
>  set the menuPick of button 3 to 2
> end mouseDown
> 
> script of button 2:
> on mouseDown
>  set the menuPick of button 4 to 2
> end mouseDown
> 
> script of pulldown button 3:
> on menuPick pChosen
>  switch pChosen
>    default
>      set the label of me to pChosen
>      answer pChosen
>  end switch
> end menuPick
> 
> script of option button 4:
> on menuPick pChosen
>  switch pChosen
>    default
>      set the label of me to pChosen
>      answer pChosen
>  end switch
> end menuPick
> 
> Are you seeing something different?
> 
> -- 
> -Mark Wieder
> mwieder at ahsoftware.net
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list