Menu

#217 Forgotten "." in wxdatepicker codegen.py

closed
None
latest source
2017-08-29
2017-08-26
No

wxdatepicker control

In codegen.py

the return line was missing "."
changed from:

return 'wx.adv' + name
to:
return 'wx.adv.' + name

hope this helps.

Regards
Graeme

        elif name.startswith('EVT_'):
            return 'wx.adv.' + name

class PythonDatePickerCtrlGenerator(wcodegen.PythonWidgetCodeWriter):
tmpl = '%(name)s = %(klass)s(%(parent)s, %(id)s%(style)s)\n'

# XXX the following needs to depend on the code generator when Phoenix is about to be supported fully:
if compat.IS_PHOENIX:
    import_modules = ['import wx.adv\n']

if compat.IS_PHOENIX:
    def cn(self, name):
        # don't process already formatted items again
        if name.startswith('wx.'):
            return name
        if name.startswith('wx'):
            return 'wx.adv.' + name[2:]
        elif name.startswith('EVT_'):
            return 'wx.adv.' + name
        return name

Discussion

  • Dietmar Schwertberger

    Thanks a lot. I have just uploaded my commits of the last weeks.
    Your patch is included as commit 2548 (13a045d65d40) (for hyperlink control as well).
    There were many other changes. I hope there are not too many new bugs. Focus is now on testing and preparation of a release.

    When you test, you may want to use this:
    There's an experimental re-do/repeat facility:
    - apply one ore multiple property changes to a widget; e.g. Border=3, Alignment=wxALIGN_CENTER
    - select another widget
    - press Ctrl-Y to apply the last change to the selected widget (in the example: Alignment=wxALIGN_CENTER)
    or
    - press Ctrl-R to apply all the changes to the selected widget

    I hope that I can eventually extend this to a full undo/redo facility.

    Regards,
    Dietmar

     

    Last edit: Dietmar Schwertberger 2017-08-29
  • Dietmar Schwertberger

    • status: open --> closed
    • assigned_to: Dietmar Schwertberger
     

Log in to post a comment.