Paul, With no records in the parent (where 0=1) , the requeryAllChildren method seems to throw an exception when the parent PK is None, so none of the children tables are being requeried (i.e. cleared if current child records exist)
Larry Long -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul McNett Sent: Friday, June 22, 2007 2:53 PM To: Dabo developers' list Subject: Re: [dabo-dev] dabo Commit 3201 johnf wrote: > On Friday 22 June 2007 11:25, Paul McNett wrote: >> johnf wrote: >>> In dForm >>> except dException.dException, e: >>> dabo.errorLog.write(_("Requery failed with response: %s") % str(e)) >>> self.notifyUser(str(e), title=_("Requery Not Allowed"), >>> severe=True) >>> >>> So in my case the exception is handled at the Form level. >> Right, which is what I'm halfway objecting to. >> >>> You are setting the exception at the bizobj level. So if I do >>> bizobj.requery() >>> >>> will the children be set correctly??? >> Yes, they should. The form really adds a very thin layer on top of >> the bizobjs, and there shouldn't be any detrimental effects just >> interacting with the bizobj directly, when necessary. The bizobj >> knows about its children, for instance. One thing you may have to do >> after your >> biz.refresh() is a form.update(), since the form wouldn't know that >> the bizobj has changed. > > > There is no biz.refresh() - right? Right... I meant biz.requery() > self.Form.update() is not updating the children because there is no > change to the child biz. If the requerying of the child biz results in the same recordset, then isn't it appropriate that form.update() doesn't seem to change anything visually? > Therefore, bizobj.requeryAllChildren() does nothing. Could this due to the > parent PK = None at the time of the requeryAllChildren()? biz.requery() should also requeryAllChildren(), and if there aren't any records in biz, then there should also be no records in all the children. -- pkm ~ http://paulmcnett.com [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]
