> I'm trying to inspect all of the menu actions within the named menus...
The following works. The trick in making your code work could be in using
constant "CDK_IT_NamedPopupMenuList" ...
Regards.
Anil Apte
=========================================
!!CB!! 134
Function: DoIt
Description:
Returns
Parameters
Static Variables
Local variables
: oApp
Class: cdkApplication
: oFormWindow
Class: cdkContainer
String: sFormNames[*]
String: sObjectName
Number: nFormCnt
Number: nIndex1
Number: nIndex2
String: sNames[*]
Number: nMenuCount
: oMenu
Class: cdkMenu
Actions
If oApp.InitFromFile ( "c:\\Myproj\\MyApp.apl" )
Set nFormCnt = oApp.EnumTopLevelWindows (sFormNames)
While nIndex1 < nFormCnt
If oApp.GetTopLevelWindow ( sFormNames[nIndex1], oFormWindow )
! Get its children
Set nMenuCount =
oFormWindow.EnumChildObjectsByName(CDK_IT_NamedPopupMenuList , sNames)
Set nIndex2 = 0
While nIndex2 < nMenuCount
Call SalMessageBox( sNames[nIndex2], 'Named Menu', MB_Ok)
If oFormWindow.GetChildObjectByText(CDK_IT_NamedPopupMenuList ,
sNames[nIndex2] , oMenu)
Set sObjectName = oMenu.GetName( )
Call SalMessageBox( sObjectName, 'OBJ Named Menu', MB_Ok)
Set nIndex2 = nIndex2 + 1
Set nIndex1 = nIndex1 + 1
Call oApp.CloseApp()