Ed Leafe wrote:
> On Jul 5, 2008, at 2:24 AM, Paul McNary wrote:
>
>> I am go through the Step-By-Step Guide to Dabo
>> and I am having a problem when trying to run
>> main.py after working through the Clients Form.
>
>
> OK, let's see if we can figure this one out.
>
>> This is the the traceback I receive:
>>
>> Traceback (most recent call last):
>> File "./main.py", line 13, in ?
>> app.start()
>
> [snip]
>
>> File "/tmp/tmpTjqYST.py", line 283, in createBizobjs
>> bizClient = self.Application.biz.BizClient(conn)
>> AttributeError: 'NoneType' object has no attribute 'BizClient'
>
> This tells us that the 'biz' module of the application never got
> set, and is still None.
>
>> I think I did the __init__.py's as explained.
>
> Perhaps; it sounds more like a directory problem. Dabo has to use
> some "magic" to locate the directories it needs.
>
>> I have been able to use AppWizard
>> and the Class Designer to access tables but this is the first time I
>> have tried the methods used in this tutorial.
>
> That's good; it tells me that your installation isn't the problem.
>
> Here are some things to check: how are you running the application?
> Are you running from a terminal or DOS prompt? If so, are you starting
> from the app's main directory?
>
> Can you run any of the other Dabo apps, such as the Class Designer,
> and open the About menu item. It will show all the versions installed on
> your machine; you can click the 'copy' button and then paste that
> information in your email reply.
>
> -- Ed Leafe
>
>
>
>
>
Hello Ed
Platform: GTK
Python Version: 2.4.5 on sco_sv5
Dabo Version: Version 0.8.4; Revision ~4111
UI Version: 2.8.7.1 on wxGTK (gtk2)
-------------------------------------------------------
#1
If I let the ClassDesigner create the Business object for me and then I
edit that, it works. It is when I am trying to instantiate a Biz object
from the biz directory that I have this trouble. I am just trying to
follow the tutorial where it does it separately from the form. This is
the Clients Form.
I am running it with main.py as instructed in the tutorial from the app
main directory. I'm sure it is a naming or import issue being done
wrong. I am not a Python guru, just a hacker.
#2
On the next form of the tutorial, the Hours Form, I have having trouble
understanding how to get a combo box populated with lookup data from the
client database. How do I get the Choices and Keys values into the
combo box. The getClients sub:
def getClients(self):
crs = self.getTempCursor()
crs.execute("select pkid, clientname from public.clients order by
clientname")
ds = crs.getDataSet()
names = [rec["clientname"] for rec in ds]
keys = [rec["pkid"] for rec in ds]
return (names, keys)
Is this tied to the Form object or the ComboBox object.
I have everything else working on this form. Again I put the BizObjects
in with the Class Designer and had no trouble. Following the tutorial, I
could never get it to work. Just starting from scratch and only using
the class designer gave me no trouble.
Thanks for your understanding and help
Paul McNary
[EMAIL PROTECTED]
_______________________________________________
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]