Author: Ed Leafe
Posted: 2009-07-26 at 18:35:06
On Jul 24, 2009, at 12:48 PM, jpoorrandp@aol.com wrote:
> ??? I don't understand why we pass "hours" to the getBizobj function
> -- the the bizobj file located in the biz directory is called
> HoursBizobj.py. I get same error when I change "hours" to
> "HoursBizobj" though. How can self.Form.getBizobj find the
> HoursBizobj.py code based on the parameter "hours" ???
Because it is searching for objects that the form already knows
about; it's not trying to import them from any file. Earlier in the
process you added an instance of the HoursBizobj to the form; the form
stores references to its bizobjs using the bizobj DataSource as the
key; in this case, the DataSource is 'hours'.
> ??? biz = self.Form.getBizobj("hours")
> AttributeError: 'NoneType' object has no attribute 'getBizobj'
That's an odd error: it says that the dropdown cannot resolve the
'Form' property. Are you sure that this code is in the dropdown's
afterInit(), and not in the form's afterInit()?
-- Ed Leafe