Author: JpoorRandP@aol.com
Posted: 2009-07-27 at 10:53:26
In a message dated 7/26/2009 6:35:18 P.M. Eastern Daylight Time,
ed@leafe.com writes:
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'.
Aha!
> ??? 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()?
That's it! I had it in the form's method.
Works now. On to the next bit.
Thanks Ed.
Jonathan
**************An Excellent Credit Score is 750. See Yours in Just 2 Easy
Steps!
yExcfooterNO62)
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---