El 04/06/13 16:58, Ed Leafe escribió:
On Jun 4, 2013, at 2:22 PM, Ricardo Aráoz <[email protected]> wrote:
I MUST be doing something wrong, here's part of my code :
class pnlPuertoSerial(dabo.ui.dPanel):
def __init__(self, *args, **kwargs):
super(pnlPuertoSerial, self).__init__(self, *args, **kwargs)
No need to even include the __init__ method here - delete those lines.
I need these lines, in the gisthub file I've included the commented
missing command.
def afterInit(self):
self.puertos = ['Com1', 'Com2', 'Com3']
self.Sizer = bsBoxSizer(self, 'h', Caption=' Puerto serial ')
rlPuertos = dabo.ui.dRadioList(self,
Choices=self.puertos,
ValueMode='String')
self.Sizer.append1x(rlPuertos) ......
class pnlParametros(dabo.ui.dPanel):
def initProperties(self):
self.StatusText = "Para programar la lectora"
def afterInit(self):
self.Sizer = vs = dabo.ui.dSizer('v')
hs = dabo.ui.dSizer('h')
hs.append1x(pnlPuertoSerial(self), border=2)
vs.append1x(hs)
The problem is in the next to last line: change it to:
hs.append1x(pnlPuertoSerial(Parent=self), border=2)
Did this, check https://gist.github.com/anonymous/5709969
It reports the following error (if you would need me to post the whole
code just tell me):
Traceback (most recent call last):
File "/home/richie/Python/ProXimaxIV/ui/ProXimax.py", line 357, in
<module>
app.start()
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/dApp.py",
line 388, in start
self.setup()
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/dApp.py",
line 340, in setup
self.initUIApp()
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/dApp.py",
line 380, in initUIApp
self.uiApp.setup()
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/uiApp.py",
line 432, in setup
frm = self.dApp.MainForm = mfc()
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dForm.py",
line 1043, in __init__
*args, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dForm.py",
line 40, in __init__
attProperties=attProperties, *args, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dFormMixin.py",
line 76, in __init__
attProperties=attProperties, *args, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPemMixin.py",
line 201, in __init__
self._afterInit()
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dForm.py",
line 58, in _afterInit
super(BaseForm, self)._afterInit()
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dFormMixin.py",
line 128, in _afterInit
super(dFormMixin, self)._afterInit()
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPemMixin.py",
line 339, in _afterInit
self.afterInit()
File "/home/richie/Python/ProXimaxIV/ui/ProXimax.py", line 332, in
afterInit
pgFrm.appendPage(pgParametros)
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPageFrameMixin.py",
line 178, in appendPage
return self.insertPage(self.GetPageCount(), pgCls, caption, imgKey,
**kwargs)
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPageFrameMixin.py",
line 211, in insertPage
pg = pgCls(self, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPage.py",
line 17, in __init__
super(dPage, self).__init__(*args, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPanel.py",
line 305, in __init__
attProperties=attProperties, *args, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPanel.py",
line 246, in __init__
properties=properties, attProperties=attProperties, *args, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPanel.py",
line 36, in __init__
properties=properties, attProperties=attProperties, *args, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPemMixin.py",
line 201, in __init__
self._afterInit()
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPage.py",
line 24, in _afterInit
super(dPage, self)._afterInit()
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPemMixin.py",
line 339, in _afterInit
self.afterInit()
File "/home/richie/Python/ProXimaxIV/ui/ProXimax.py", line 296, in
afterInit
pnl = self.pnl = pnlParametros(self)
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPanel.py",
line 268, in __init__
attProperties=attProperties, *args, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPanel.py",
line 246, in __init__
properties=properties, attProperties=attProperties, *args, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPanel.py",
line 36, in __init__
properties=properties, attProperties=attProperties, *args, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPemMixin.py",
line 201, in __init__
self._afterInit()
File
"/usr/local/lib/python2.7/dist-packages/Dabo-0.9.9-py2.7.egg/dabo/ui/uiwx/dPemMixin.py",
line 339, in _afterInit
self.afterInit()
File "/home/richie/Python/ProXimaxIV/ui/ProXimax.py", line 284, in
afterInit
hs.append1x(pnlPuertoSerial(parent=self), border=2)
File "/home/richie/Python/ProXimaxIV/ui/ProXimax.py", line 163, in
__init__
super(pnlPuertoSerial, self).__init__(self, *args, **kwargs)
TypeError: __init__() got multiple values for keyword argument 'parent'
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]