| Reply | « Previous Thread | Next Thread » |
|
If the handle given with a menu item has elipses ('()') the method is automatically invoked.
Code:
appuifw.app.menu = [( u"Start", self.start(go=True))]
def start(self, go=True):
if go:
print 'hi'
|
| bercobeute |
| View Public Profile |
| Find all posts by bercobeute |
|
Yes, it's standard Python behaviour. Use:
Code:
appuifw.app.menu = [( u"Start", lambda:self.start(go=True))] |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |