On 2/16/10 1:48 PM, Ed Leafe wrote: > On Feb 16, 2010, at 4:02 PM, Jacek Kałucki wrote: > >> Could be dPageFrameMixin class added to dabo.ui module, please? >> Other mixins are present so I can use dControlMixin, dFormMixin, etc. >> to create custom class, but not dPageFrameMixin class :( > > > I suppose it could, but I'm surprised that we expose these classes as > fundamental dabo.ui classes. The only reason they should be exposed that I > can think of is as a test: e.g., to see if an object is a form, use > isinstance(obj, dabo.ui.dFormMixin). > > These mixins should really be private to the framework. What type of > custom class are you creating?
I have a hunch the mixins could be made private now, but at the time (6.5 years ago, r429 and r430) there may have been reasons that couldn't be the case. However, best to leave it alone for now. There's some hairy namespace mangling going on, causing weird side-effects depending on whether you are inside dabo.ui.uiwx or just importing dabo.ui. I've been wanting to redesign all this for, oh, about six and a half years now. :) What we should be doing IMO is defining the complete UI interface in dabo.ui (classes with mostly stub properties and methods), and only mixing in the wx layer at runtime (after loadUI). Then, some weird things we've gotten used to will disappear: + Won't need to loadUI() before defining subclasses of UI objects (only before trying to instantiate them). This would relegate loadUI() an unnecessary thing for user code to explicitly call, as dApp() could default to wx. + The ui and the ui.uiwx namespaces will no longer collide, which confuses isinstance() in some cases. + Auto-documenting tools won't be as confused. + The poor souls trying to understand the class hierarchy won't be quite as confused. And, we'd gain a clean separation of common UI code and wx-specific stuff, which will be important if we ever want to wrap another library, such as TurboGears or something for the web. Paul _______________________________________________ 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]
