menu problems

  • Nobody/Anonymous


    i'm using the latest SpecTcl version (downloaded from sourceforge).  i'm having problems with menus, when i create a menubutton, a menu to which i bind the button and a menu item and when i test the app and press the menubutton to make the menu open i get the following error:

    invalid command name ".objbut.men1"
    invalid command name ".objbut.men1"
        while executing
    "$menu activate none"
        (procedure "tk::MbPost" line 28)
        invoked from within
    "tk::MbPost $tk::Priv(inMenubutton) 252 251"
        invoked from within
    "if {[string compare $tk::Priv(inMenubutton) ""]} {
        tk::MbPost $tk::Priv(inMenubutton) 252 251
        (command bound to event)

    i'm using tcl/tk 8.4a3, any idea where could this come from?

    please let me know that You've replied to


    • Nobody/Anonymous

      In Tk, the menu connected to a menubutton must be a child of the menubutton itself. In the "Widget Properties" window for menubuttons, the path of the menubutton itself is implicitly implied in the "menu" property.

      The solution in your particular case is to rename your menu from "men1" to "objbut.men1" with the menueditor.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks