Hi Ed,
On 08/01/2014 17:00, Ed Leafe wrote:
On Jan 8, 2014, at 9:45 AM, Werner <[email protected]> wrote:
Looking at pemmixin.__init__ I see:
self._initEvents()
self._afterInit()
dPemMixinBase.__init__(self) ## don't use super(), or wx init called
2x.
which would explain the issue no, dPemMixinBase is inheriting from dObject.
Can I just change the order of these lines, i.e. move the dPemMixinBase.__init
up to before self._initEvents or does that cause other issues?
It would seem to me that _afterInit() should be called after __init__(), no?
Sounds good to me:-)
Moved it but same issue.
I am debugging it using WingIDE 5.0 and what gets me is why I see this:
This is the line in question in dToolBarItem.__init__:
if wxItem.ToolBar:
wxItem.ToolBar.bindEvent(dEvents.Update, self.__onUpdate)
self
<__main__.dToolBarItem (baseclass __main__.dToolBarItem, id:93788496)>
wxItem
<wx._core.ToolBarToolBase object at 0x05878810>
wxItem.ToolBar
<wx._core.ToolBarBase object at 0x05894930>
wxItem.ToolBar.__class__.mro()
[<class 'wx._core.ToolBarBase'>, <type 'sip.wrapper'>, <type
'sip.simplewrapper'>, <type 'object'>]
wxItem.__class__.mro()
[<class 'wx._core.ToolBarToolBase'>, <class 'wx._core.Object'>, <type
'sip.wrapper'>, <type 'sip.simplewrapper'>, <type 'object'>]
Shouldn't the above also include "dToolbar" and "dToolbarItem" when it
is working correctly?
If I do:
for x in dToolBar.mro():
print x
<class '__main__.dToolBar'>
<class 'dabo.ui.uiwx.controlmixin.dControlMixin'>
<class 'dabo.ui.controlmixinbase.dControlMixinBase'>
<class 'dabo.ui.uiwx.pemmixin.dPemMixin'>
<class 'dabo.ui.pemmixinbase.dPemMixinBase'>
<class 'dabo.dObject.dObject'>
<class 'dabo.lib.propertyHelperMixin.PropertyHelperMixin'>
<class 'dabo.lib.eventMixin.EventMixin'>
<class 'wx._core.ToolBar'>
<class 'wx._core.Control'>
<class 'wx._core.Window'>
<class 'wx._core.WindowBase'>
<class 'wx._core.EvtHandler'>
<class 'wx._core.Object'>
<class 'wx._core.Trackable'>
<type 'sip.wrapper'>
<type 'sip.simplewrapper'>
<type 'object'>
Werner
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]