#123 menubar.Enable

open
nobody
None
5
2013-02-03
2013-02-03
Anonymous
No

Unchecking Enable for a menubar does not work, at least for python generated code, though I don't see an alternate signature that would accept just a boolean in the C++ docs, either.

The python wrapper code specifies the signature:

Enable(self, int id, bool enable)

Traceback (most recent call last):
File "C:/Users/dmcook/git/dynamicpro-5/DP5/mainframe2.py", line 373, in <module>
app = TestApp()
File "C:/Users/dmcook/git/dynamicpro-5/DP5/mainframe2.py", line 361, in __init__
wx.App.__init__(self, 0)
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7981, in __init__
self._BootstrapApp()
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7555, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "C:/Users/dmcook/git/dynamicpro-5/DP5/mainframe2.py", line 364, in OnInit
self.m_frame = MainFrame('test')
File "C:/Users/dmcook/git/dynamicpro-5/DP5/mainframe2.py", line 40, in __init__
gui.MainFrameBase.__init__(self, parent=None)
File "C:\Users\dmcook\git\dynamicpro-5\DP5\gui.py", line 33, in __init__
self.m_menubar.Enable( False )
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 11372, in Enable
return _core_.MenuBar_Enable(*args, **kwargs)
TypeError: Required argument 'enable' (pos 3) not found

Discussion