On Jan 10, 2006, at 8:06 PM, Don Taylor wrote:

I have designed a small app UI with the Designer and saved it as a runnable app which gives me a Python module that invokes the .cdxml file. I can see how to write event routines that get embedded within the .cdxml module, but I can't figure out how to call other Python classes and methods from the event routines because I don't know where to specify the import statememnts for external modules. The only place that I can see would be in the onActivate method of the dForm object.

Is this where you intended this sort of thing to take place?

This seems to be a limit of the Python compile function. To use other modules, add the import statement right after the 'def' statement for any and all functions defined in the Designer. Unfortunately, since each method is compiled individually, if you use a module in several methods, you need to add the import statement into each one.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




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

Reply via email to