>Hi,
>
>I have this application working with shortcutmenu's to do a specific method on the form. Right now there is coding with public variables:
>public pcSelection
>do shortcut1.mpr
> on the shortcut menu bars yopu will find: in the bar - PROCEDURE and the procedure reads: pcSelection = 'NewList' a.s.o.
>do case
>case pcSelection = "NewList"
>thisform.createnewList()
>endcase
>
>All works well however I would like to get rid of the public-variable's
>do we have an other solution to activate a method on myForm upon selection of a shortcutmenu bar?
>
>Regards,
>
>Koen
You can pass a reference to the form object to the menu:
DO shortcut1.mpr WITH Thisform
In the setup code of the menu, declare the parameter
PARAMETERS toForm AS Form
From then on, the form methods may be called directly as the action triggered by the menu selection (that is, as a command):
ON SELECTION BAR n OF shortcutmenuname toForm.createnewList()
----------------------------------
António Tavares Lopes