In Dabo's API docs says about afterSetMenubar() that """Subclasses can
extend the menu bar here""".
So I wrote some code for extending the menu bar in this method. It
didn't work. So I put a print statement but I see nothing in the command
window. So I move my code to the afterInitAll() method and everything
works as expected.
Is this a bug or did I misunderstand the docs?

On a side note, the method is :
    def afterInitAll(self):
        mb = self.MenuBar
        fm = mb.getMenu('File')
        fm.prependSeparator()
        fm.prepend('back to original size', OnHit=self.fitToSizer)

It works and takes the form back to the orig. size after changes have
been made to it's size. But in the command window the following
exception is triggered:

Traceback (most recent call last):
  File
"/usr/local/lib/python2.6/dist-packages/dabo/ui/uiwx/dMenuItem.py", line
58, in __onWxHit
    self.raiseEvent(dEvents.Hit, evt)
  File
"/usr/local/lib/python2.6/dist-packages/dabo/ui/uiwx/dPemMixin.py", line
1007, in raiseEvent
    super(dPemMixin, self).raiseEvent(eventClass, nativeEvent, *args,
**kwargs)
  File "/usr/local/lib/python2.6/dist-packages/dabo/lib/eventMixin.py",
line 96, in raiseEvent
    bindingFunction(event)
  File
"/usr/local/lib/python2.6/dist-packages/dabo/ui/uiwx/dPemMixin.py", line
815, in fitToSizer
    self.Width += extraWidth
TypeError: unsupported operand type(s) for +=: 'int' and 'Hit'

This is :
Platform: GTK
Python Version: 2.6.5 on linux2
Dabo Version: Version 0.9.3; Revision 6422
UI Version: 2.8.10.1 on wxGTK (gtk2)




--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to