Closed lebao3105 closed 2 years ago
I have some functions defined in other class than the main class where I placed the pygubu.Builder code. And I need to run one of them from a menu command:
pygubu.Builder
<object class="tk.Menu" id="menu1"> <child> <object class="tk.Menuitem.Command" id="new" named="True"> <property name="command" type="command" cbtype="simple">fileops.new_tab</property> <property name="label" translatable="yes">New (Ctrl+N)</property> </object> </child> </object>
And pygubu doesn't find out the specified command:
Missing callbacks for commands: ['fileops.new_tab']
I tried this too, and the program (and pygubu) returns nothing:
new = builder.get_object("new", master) new.command = lambda: fileops.new_tab(self)
I searched around the pygubu-designer wiki page and I've found this solution. Sorry to bother you this time
pygubu-designer
I have some functions defined in other class than the main class where I placed the
pygubu.Builder
code. And I need to run one of them from a menu command:And pygubu doesn't find out the specified command:
I tried this too, and the program (and pygubu) returns nothing: