On Sep 11, 2020, at 09:55, john <[email protected]> wrote:
>
> I know you are on another project/job and need to make that your priority -
> but a quick yes or no will work.
>
> I am confused you renamed all (most of) the files in the UI. You removed the
> 'd' in the file names. And of course the class names contain the 'd' i.e.:
>
> box.py ->class dBox(...
Yes, that was to help reduce the name conflicts.
> I'm guessing but you didn't have time to deal with the demo/samples files
> because none of them have the file names changed (the 'd' was not removed).
> It is your intent to changes the samples files too (remove the 'd')?
Yes, but I did not have enough time to get to update anything much beyond the
main framework.
> Where I get confused is the git commits suggest that the UI files are
> running. They do not run for me without me changing how the inheritance is
> called:
>
> from dabo.ui import dControlMixin
> class dBox(dControlMixin, wx.StaticBox)
>
> to work I need
>
> from dabo.ui import dControlMixin
> class dBox(dControlMixin.dControlMixin, wx.StaticBox)
>
> That said, I am testing on Ubuntu 20 (so I can test) wxPython 4.1, python
> 3.8.x and on OpenSuse 15.1 wxPython 4.0.7, python 3.6.x.
>
> Am I doing the right thing by making the changes??
No, that is not correct. The UI has to be loaded first before you can access
it. That’s done automatically when creating an instance of dApp, but otherwise
you would need:
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
import dabo.ui
dabo.ui.load_namespace()
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
That method is defined in dabo/ui/__init__.py:
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
def load_namespace():
"""Add all the UI classes to the dabo.ui namespace.
This must be called before any UI work can be done. This is done
automatically when `import
dabo` is called, so you should never have to call it manually.
IMPORTANT: the order of these imports should not be changed without
extensive testing, as some
classes inherit from or otherwise reference other classes, so those
referenced classes need to
be added to the namespace first.
“””
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
As the docstring says, the order of the imports is critical, because so many
classes depend on others being in the namespace already.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: https://leafe.com/archives
This message:
https://leafe.com/archives/byMID/[email protected]