Sibylle Koczian wrote: > Hello, > > in the afterInit method of my form I put a dGrid in with > > testLog = dabo.ui.dEditBox(self, RegID="testlogID", ReadOnly=True) > testLog.Value = "SQLite Feldtest" > panel.Sizer.append1x(testLog) > > and in the afterRequery method I want to put additional text in: > > def afterRequery(self): > self.testlogID.Value += u"\nRequery ausgeführt." > > If I try to run the application I get: > > Traceback (most recent call last): > File "sqlite_feldtest.py", line 49, in <module> > app.start() > File "/usr/lib/python2.5/site-packages/dabo/dApp.py", line 314, in start > self.setup() > File "/usr/lib/python2.5/site-packages/dabo/dApp.py", line 279, in setup > self.initUIApp() > File "/usr/lib/python2.5/site-packages/dabo/dApp.py", line 306, in initUIApp > self.uiApp.setup() > File "/usr/lib/python2.5/site-packages/dabo/ui/uiwx/uiApp.py", line 279, in > setup > frm = self.dApp.MainForm = mfc() > File "/usr/lib/python2.5/site-packages/dabo/ui/uiwx/dForm.py", line 895, in > __init__ > BaseForm.__init__(self, preClass, parent, properties, attProperties, > *args, **kwargs) > File "/usr/lib/python2.5/site-packages/dabo/ui/uiwx/dForm.py", line 44, in > __init__ > fm.dFormMixin.__init__(self, preClass, parent, properties, attProperties, > *args, **kwargs) > File "/usr/lib/python2.5/site-packages/dabo/ui/uiwx/dFormMixin.py", line > 72, > in __init__ > attProperties, *args, **kwargs) > File "/usr/lib/python2.5/site-packages/dabo/ui/uiwx/dPemMixin.py", line > 185, > in __init__ > self._afterInit() > File "/usr/lib/python2.5/site-packages/dabo/ui/uiwx/dForm.py", line 70, in > _afterInit > super(BaseForm, self)._afterInit() > File "/usr/lib/python2.5/site-packages/dabo/ui/uiwx/dFormMixin.py", line > 128, in _afterInit > self.createBizobjs() > File "sqlite_feldtest.py", line 41, in createBizobjs > self.requery() > File "/usr/lib/python2.5/site-packages/dabo/ui/uiwx/dForm.py", line 499, in > requery > self.afterRequery() > File "sqlite_feldtest.py", line 44, in afterRequery > self.testlogID.Value += u"\nRequery ausgeführt." > AttributeError: 'FrmTest' object has no attribute 'testlogID' > > FrmTest is the name of the main form. Why this error? I thought this was the > way to use the RegID property? What's wrong here? > > Sibylle
Try putting your call to requery() into afterInitAll() instead of calling it in createBizobjs(). Uwe _______________________________________________ Post Messages to: Dabo-users@leafe.com 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]