On Sunday 24 January 2010 10:50:27 am John wrote:
> On Sunday 24 January 2010 10:42:32 am Ed Leafe wrote:
> > On Jan 24, 2010, at 1:34 PM, John wrote:
> > > I guess I'll have to revert back.  But I wish I had discovered what was
> > > causing the issue.  I'll wait a while in case you have another
> > > suggestion.
> >
> >     It's almost always a class that tries to import something from uiwx
> > before the app has started up. E.g., when I was creating dSpinner from
> > other Dabo uiwx classes, I had to go through a lot to avoid the sort of
> > problem you're seeing. The code would try to import something that hadn't
> > yet been imported into the dabo.ui namespace, so it would try to re-load
> > the UI classes, and get a sort of circular reference that would cause the
> > kind of errors you're getting.
> >
> >
> > -- Ed Leafe
>
> Would I see the uiwx.__init__.py called twice?  Also I don't see why your
> recent changes in the code would suddenly cause my class code to error out?
> I just added most (not all yet) of my classes to the test form without
> error. Hmmm !
>
>
> I'll look for the circular reference - thanks
>
> Johnf

I have discovered that the order in which I import modules is very important.  
If I have the following I get errors.

import wx
dabo.ui.loadUI("wx")

It is also true that any modules that contain similar imports will cause the 
error.

See earlier postings.

However, if I import as follows:
dabo.ui.loadUI("wx")
import wx

Or I arrange the imports (including my modules) in some different order I 
don't get errors.

So the question is should the framework be so depended on the order of the 
imports?  I wouldn't think so.  In my modules I import many other modules to 
allow for testing.  Is it a requirement to isolate import's to insure they 
don't cause errors in Dabo?  It would seem that python and the framework 
should realize that the import's were in the namespace and not attempt to 
import again.  Isn't that standard Python?

Johnf


 



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to