AnsweredAssumed Answered

VDSP++ menu item handling in JScript

Question asked by msonet on Jun 28, 2013
Latest reply on Jul 1, 2013 by CraigG

Hi,

 

I would like to add new menu items in the VDSP++ interface and would like to do it in JScript.

So how do you handle the OnMenuItemClicked event in JScript ?

 

The following example in VBScript is working fine:

 

menuid = MenuManager.AddMenuTail( "&Tools:&My Menu Item", "This is a custom menu item." )

Sub menumanager_OnMenuItemClicked(ByVal MenuID)

    If (MenuID = menuid) Then

        Idde.OutputWindow.PrintText "My Menu Item was clicked", tabConsole

    End If

End Sub

 

The same example coded in JScript is not working:

 

menuid = MenuManager.AddMenuTail( "&Tools:&My Menu Item", "This is a custom menu item.");

function menumanager_OnMenuItemClicked(MenuID)

{

    if (MenuID = menuid)

    {

        Idde.OutputWindow.PrintText("My Menu Item was clicked", tabConsole);

    }

}

 

The menu item is added but I don't get the call to my menumanager_OnMenuItemClicked function.

 

Any idea?

 

Best regards,

Mathieu

Outcomes