doMenu

Richmond Mathewson richmondmathewson at gmail.com
Tue Jul 10 06:32:16 EDT 2018


Thanks Tore,

This is alright if one knows what the actual handler sparked by the menu 
item is.

on mouseUp
    set the style of the templateGraphic to polygon
    create graphic "zzz"
    set the points of grc "zzz" to fld "PTZ"
end mouseUp

Richmond.

On 10/7/2018 12:07 pm, Tore Nilsen via use-livecode wrote:
>> 10. jul. 2018 kl. 10:43 skrev Richmond via use-livecode <use-livecode at lists.runrev.com>:
>>
>> Is it possible to send a *doMenu* command to a menu item several levels down?
>>
>> Such as *Object/New Control/Radio Button* ?
>>
>> Richmond.
>>
>> _______________________________________________
>> 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
> I cannot answer your question about the sending of doMenu to items in a hierarchy, but this seems to me to be a situation where you would be better off placing the actual handler for what you would like to do in the stack script. Then all it takes is a call to this handler, be it from the menu item or from somewhere else. This way you do not need to send a doMenu command at all. This is how I teach my students to structure their code.
>
> Regards
> Tore Nilsen
> _______________________________________________
> 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