Reorganizing some classes...previously both RATextBox and RANumBox were
based on dTextBox.   Now I want to base RANumBox off RATextBox.  I also
moved some code from the afterInit to the setProperties and now when I run
it the form is giving me the too many parameters error.(see below)

Any suggestions as to what is wrong?

Thanks,
Larry Long

class RATextBox(dabo.ui.dTextBox):
    def setProperties(self):
        self.SelectOnEntry = True
        if sys.platform == 'win32':
            self._addWindowStyleFlag(wx.TE_PROCESS_ENTER)
        
        if self.InputType is 'I':
            self.Value=0
        elif self.InputType is 'N':
            self.Value=0.0
        else:
            self.Value=''
            
        try:
            if self.AddAllowed:
                pass
        except:    
            self.AddAllowed=True
        
        self.DynamicForeColor = self.ROForeColor
        self.DynamicBackColor = self.ROBackColor

class RANumBox(RATextBox):
    def setProperties(self):
        self.super()
            ....other code


TypeError: setProperties() takes exactly 1 argument (2 given)

Traceback (innermost last):

File "d:\pyProject\pyProject\LotsMfrm1.py", line 1, in <module>
  import dabo
File "d:\pyProject\pyProject\LotsMfrm1.py", line 410, in <module>
  app.start()
File "d:\dabo\dabo\dApp.py", line 262, in start
  self.setup()
File "d:\dabo\dabo\dApp.py", line 227, in setup
  self.initUIApp()
File "d:\dabo\dabo\dApp.py", line 254, in initUIApp
  self.uiApp.setup()
File "d:\dabo\dabo\ui\uiwx\uiApp.py", line 223, in setup
  frm = self.dApp.MainForm = mfc()
File "d:\dabo\dabo\ui\uiwx\dForm.py", line 870, in __init__
  BaseForm.__init__(self, preClass, parent, properties, attProperties,
*args, **kwargs)
File "d:\dabo\dabo\ui\uiwx\dForm.py", line 43, in __init__
  fm.dFormMixin.__init__(self, preClass, parent, properties, attProperties,
*args, **kwargs)
File "d:\dabo\dabo\ui\uiwx\dFormMixin.py", line 66, in __init__
  attProperties, *args, **kwargs)
File "d:\dabo\dabo\ui\uiwx\dPemMixin.py", line 185, in __init__
  self._afterInit()
File "d:\dabo\dabo\ui\uiwx\dForm.py", line 69, in _afterInit
  super(BaseForm, self)._afterInit()
File "d:\dabo\dabo\ui\uiwx\dFormMixin.py", line 113, in _afterInit
  super(dFormMixin, self)._afterInit()
File "d:\dabo\dabo\ui\uiwx\dPemMixin.py", line 299, in _afterInit
  self.afterInit()
File "d:\pyProject\pyProject\LotsMfrm1.py", line 247, in afterInit
  self.Sizer.append1x(MainPanel(self))
File "d:\dabo\dabo\ui\uiwx\dPanel.py", line 173, in __init__
  _PanelMixin.__init__(self, preClass, parent, properties, attProperties,
*args, **kwargs)
File "d:\dabo\dabo\ui\uiwx\dPanel.py", line 32, in __init__
  *args, **kwargs)
File "d:\dabo\dabo\ui\uiwx\dPemMixin.py", line 185, in __init__
  self._afterInit()
File "d:\dabo\dabo\ui\uiwx\dPemMixin.py", line 299, in _afterInit
  self.afterInit()
File "d:\pyProject\pyProject\LotsMfrm1.py", line 394, in afterInit
  hs = HeaderPanel(self)
File "d:\dabo\dabo\ui\uiwx\dPanel.py", line 158, in __init__
  _PanelMixin.__init__(self, preClass, parent, properties, attProperties,
*args, **kwargs)
File "d:\dabo\dabo\ui\uiwx\dPanel.py", line 32, in __init__
  *args, **kwargs)
File "d:\dabo\dabo\ui\uiwx\dPemMixin.py", line 185, in __init__
  self._afterInit()
File "d:\dabo\dabo\ui\uiwx\dPemMixin.py", line 299, in _afterInit
  self.afterInit()
File "d:\pyProject\pyProject\LotsMfrm1.py", line 160, in afterInit
  keybox=RATextBox(self,RegID ='txtLotID',TextLength=18,DataSource =
"public.aglots", DataField ="clot",AddAllowed=False)
File "d:\dabo\dabo\ui\uiwx\dTextBox.py", line 19, in __init__
  *args, **kwargs)
File "d:\dabo\dabo\ui\uiwx\dTextBoxMixin.py", line 378, in __init__
  dTextBoxMixinBase.__init__(self, preClass, parent, properties,
attProperties, *args, **kwargs)
File "d:\dabo\dabo\ui\uiwx\dTextBoxMixin.py", line 30, in __init__
  dcm.dDataControlMixin.__init__(self, preClass, parent, properties,
attProperties, *args, **kwargs)
File "d:\dabo\dabo\ui\dDataControlMixinBase.py", line 20, in __init__
  dabo.ui.dControlMixin.__init__(self, *args, **kwargs)
File "d:\dabo\dabo\ui\uiwx\dPemMixin.py", line 179, in __init__
  self._setProperties(properties)
File "d:\dabo\dabo\ui\uiwx\dPemMixin.py", line 213, in _setProperties
  self.setProperties(properties)

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.15/847 - Release Date: 06/12/2007
9:42 PM
 



_______________________________________________
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/dabo-users/[EMAIL PROTECTED]

Reply via email to