johnf wrote:
> Of course all of this moot at the moment if I keep adding import statements 
> to 
> my code and dabo.ui.loadUI("wx") to my code.

imports only need to appear once in any script, because all namespaces 
under that script have access to the "global" imports. IOW, if you have 
this:

#-- test.py

class MyTest(object):
        def func1(self):
                import foo
                foo.do_stuff()

        def func2(self):
                import foo
                foo.do_other_stuff()

#-- end test.py

You can change that to:

#-- test.py
import foo

class MyTest(object):
        def func1(self):
                foo.do_stuff()

        def func2(self):
                foo.do_other_stuff()

#-- end test.py


As far as dabo.ui.loadUI("wx"), that only needs to occur once, but it 
doesn't hurt to do it multiple times. The main reason you may need this 
in each of your UI scripts is for testing them as units: whereas the 
main script is the only place you'll need that line in the normal 
running of the app, if you want to run just ui/FrmCustomers.py you'll 
need the line there for it to work.


> BTW if this is to much to explain - don't take the time.  One day a light 
> will 
> flash on - I hope.

It will. It is one of those things that is so simple, like being able to 
invert a 3-d cube in your mind to see it sinking into the page rather 
than popping out of the page, that once you overcome the block you'll 
never know why you struggled so much.


-- 
pkm ~ http://paulmcnett.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to