plan9soft / arcreator

Automatically exported from code.google.com/p/arcreator
0 stars 0 forks source link

Refactor Templates for better maintainability #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Convert the Core.DatabaseEditor.WelderTemplates.py module to use XRC (XML based 
WxWidgits template)

The current process of useing a python class template generated by wxForm 
editor and then editing it for custome abilities is too unwieldy and time 
consuming to maintain and edit. the templates can instead be generated from the 
form editor as XRC, an XML mark up language for WX, and extended from there. 

Ideally this transition should include both a factory class that can take an 
identifier for the needed control and a parent window, construct it, and return 
it. As well as some sort of library controller formanaging all XRC Resources

Original issue reported on code.google.com by Ryexander on 6 Sep 2014 at 9:54

GoogleCodeExporter commented 9 years ago

Original comment by Ryexander on 6 Sep 2014 at 9:54

GoogleCodeExporter commented 9 years ago

Original comment by Ryexander on 6 Sep 2014 at 9:55

GoogleCodeExporter commented 9 years ago

Original comment by Ryexander on 6 Sep 2014 at 9:56

GoogleCodeExporter commented 9 years ago
On further investigation perhaps a full move to XRC is hasty and unnecessary. 
wx form builder has the ability to inject construction code to be sure custom 
classes are properly setup, so long as the generated file is run through a 
python formater to get rid of the awkward spacing problems generated by the 
form builder and run through 2to3 to update the code to python 3 it should be 
good.

Original comment by Ryexander on 6 Sep 2014 at 11:20

GoogleCodeExporter commented 9 years ago
Actually XRC is a dumb move, the ability to inject construction code and python 
3's ability to do local import means construction code can reference a local 
module where plugin based item can be imported and made available to the 
templates. All templates will be renamed to have _Template at the end of their 
name so confusion won't arise

Original comment by Ryexander on 8 Sep 2014 at 1:43

GoogleCodeExporter commented 9 years ago
fixed by r798

Original comment by Ryexander on 20 Sep 2014 at 11:44