On Sunday, November 14, 2010 10:42:06 am Carey Gagnon wrote: > No Joy > > I'm trying to follow this forum thread as it seems exactly what I need: > http://old.nabble.com/Delivered-Second-Project%21-tp29188888p29192380.html > > And here's what Paul suggests: > > How about, in frmPolicies: > > class FrmPolicies(dabo.ui.dForm): > ... > def afterInit(self): > self.bind(dabo.dEvents.Activate, self.*onActivate*) > ... > > def *onActivate*(self, evt): > print "form activate" > self.refreshAgents() > > def refreshAgents(self): > bizAgents = self.getBizobj("agents") > bizAgents.requery() > dsAgents = bizAgents.getDataSet(flds=("id", "name")) > lstAgents = self.lstAgents ## ('cuz you named it's RegID that way) > lstAgents.Choices = [rec["name"] for rec in dsAgents] > lstAgents.Keys = [rec["id"] for rec in dsAgents] > > I have given the builders dropdownlisy a RegID of ddBuilders > but when I call it I get the following: > self.refreshBuilders() > File "c:\docume~1\admini~1\locals~1\temp\tmpjlhmhu.py", line 565, in > refreshBuilders > ddBuilders = self.ddBuilders > AttributeError: 'dForm_79565' object has no attribute 'ddBuilders' > > Puals resolution here seem to be for hand coded forms but mine are done in > the CD > > Carey
yea - Paul's solution does appear to be hand coded. But I think you can still do it from ClassDesigner by adding a method (like you have in the past). I can't recall the form names - but where you have the code for RegID = "ddBuilders" is where you have access (again dShell can be your friend). Johnf _______________________________________________ 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]
