When a callback procedure needs information from a compiled resource, it obtains the information by using gms-get-activation-property, as described under Obtaining Menu Entry Attributes in an Activation Context. Code that runs outside of an activation context cannot use this call, because:
To obtain information about properties from the compiled resource:
gms-get-property
(handle: integer, menu-index: integer, property-name: symbol) -> property-value: item-or-value
gms-get-property to display any attribute that is in an object attribute list or table. You cannot use gms-get-property to access information about the dynamically created part of a dynamic menu specification. Such information exists only transiently, and is deleted as soon as GMS no longer needs it.To obtain information about menu structure from the compiled resource use the procedure
gms-return-submenu-entries as described in Obtaining All Cascade Menu Entries.
Executing a Callback Procedure
Using a keyboard accelerator requires G2 to execute the same callback procedure that GMS would execute if the user selected some GMS menu leaf entry. A button or a rule also may have reason to execute a callback procedure.
To execute a callback procedure from code running outside GMS:
gms-execute-activation-callback
(handle: integer, menu-index: integer)
gms-execute-activation-callback to execute the callback procedure of an entry that is defined in a Reusable Panel template, or in any submenu descended from such a template, because such an entry does not have a unique activation path unless the user has explicitly navigated to it with the mouse.