Ed Leafe wrote:
The problem is that when you run 'python dListControl.py', the list control object that is created is not an instance of dListControl! This is true of all Dabo controls. To see what I mean, add this line at the very end of the __init__() code for dButton.py, and then run the test:

        print "INIT DONE:", self, isinstance(self, dabo.ui.dButton)

When the test runs, it will print that message out, and the last item will be 'False'. Now run a regular app that uses dButton, and see that the messages print out with 'True' at the end.

Whoa.

This is most likely due to the use of wx frames and such in the testing code; at least that's my take on it. This is going to severely limit the validity of testing, since code that relies on isinstance() is now unreliable.

No, I think it comes down to namespace resolution issues. I've noticed similar oddities in that past, that I think come down to Python getting confused because from the dabo/ui/uiwx context, dabo.ui.dListControl can't be resolved to an object (you'd have to say dabo.ui.uiwx.dListControl, or just 'from dListControl import dListControl').

The simplest answer for now would seem to be to move the test code outside the uiwx directory, which may be the right thing anyway, once all the wx cruft is removed, such as using the wx.Frame as you mentioned.

--
Paul McNett
http://paulmcnett.com
http://dabodev.com


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

Reply via email to