in reply to Re: Tk menu Apple macOS
in thread Tk menu Apple macOS

A couple of thoughts. In the Tkx example the line that stroke my ears was:

$appmenu = Tkx::widget->new(Tkx::menu($m->_mpath . ".apple"));

This seems to create a new menu item with a specific name given by appending 'apple' to the widget's name ($m->_mpath), only after this step it creates a cascade item. $m->_mpath doesn't seem to be Tk code, however Tk knows $widget->PathName which may be (?) a substitution for it. I think the key is around this line. We possibly need a way to set the name of the widget like above. The -label doesn't seem enough.

PS: Actually I am accessing tcl/tk with Tcl::Tk and/or tcl::pTk (which are great to avoid X11 and have a much much nicer looking GUI). However, this shouldn't make a big difference, at least not at this stage of general understanding.