>I have been trying your object menu class.
>Is it possible to add shortcut menu to "thisform."
>and have that shortcut menu.....command call a method on the form?
>
>thisform.Menu.ShortEdit.printsomething.command ="thisform.menuprintwhatever"
>
>I have tried with no luck
>Thanks
>
>Ken Paulson
Hi Ken,
Yes, what you want is possible, But requires a little 'tweak' when dealing with a top-level form. Unfortunately, I left that little something out of the documentation.
For menus on Top-Level forms only!It's necessary to give the menu a reference to the form. In the demo, this is done by assigning a unique name to the form on startup, then creating a global variable that stores a reference to the form. The menu class will automatically pick up this reference when the menu is created ( as long as the variable is named "go" + Formname).
The demo provided uses the following code :-
Top-Level form InitLOCAL lcName
DODEFAULT()
lcName = "go" + THIS.name
PUBLIC &lcName
&lcName = THISTop-Level form DestroyLOCAL lcName
lcName = "go" + THIS.Name
&lcName = .NULL.
RELEASE &lcName
DODEFAULT()I'll shortly be adding a FAQ and update to the documentation on the menulib web page at
http://www.hidb.com/menulib