First, please note that I have hand coded my forms for awhile, so I'm rusty
on using the CD.

Using the revised Pycon Tutorial, I tried to get the dropdownlist control
working. I kept getting an error message at runtime that there was no method
called "getNamesAndKeys". I replaced the dropdown's afterInitAll with "pass"
then after doing some debugging I found that the form (apparently) was not
seeing self.clientBizobj.

I put this code in the afterInitAll of the form to try to see what was going
with the bizobjects:

def afterInitAll(self):
     print 'afterInitAll'
     bzh = self.getBizobj('hours')
     print 'bzh: ', bzh
     ### prints: bzh: <biz.HoursBizobj.HoursBizobj (baseclass
dabo.biz.dBizobj, id:51218160)>

     bzc = self.getBizobj('client')
     print 'bzc: ', bzc
     ### ---> prints: None

The form didn't seem to know about the clientBizobj, so I checked the
following:
In my bz folder I have ClientBizobj.py containing Class ClientBizobj using
code pasted from the tutorial.
Also in the bz folder is HoursBizobj.py containing Class HoursBizobj using
code pasted from the tutorial.
Checked both files for indentation errors, etc. and couldn't see any
problems
Also in the bz folder is __init__.py with the import statements for both
HoursBizobj.py and ClientBizobj.py

 The form's createBizobjs method looks like this (pasted from the tutorial):

     def createBizobjs(self):
        hoursBizobj = self.Application.biz.HoursBizobj(self.Connection)
        self.addBizobj(hoursBizobj)
        clientBizobj = self.Application.biz.ClientBizobj(self.Connection)
        self.addBizobj(clientBizobj)

The form's afterInit has just self.requery(). (There is not an explicit
requery of clientBizobj in the tutorial)

I'm at a loss as to why self.clientBizobj is not being created, or if
created, why the form doesn't see the reference.
Obviously I've made a blunder somewhere but I don't know what else to check.
Any help appreciated.

Steve Rose


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---
_______________________________________________
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]

Reply via email to