Feedback required: new code generation (branch NEW_CODEGEN)

Dietmar Schwertberger <[email protected]>
Newsgroups gmane.comp.python.wxglade
Message-ID <[email protected]>
Hi!

Over the last few months I have been working a lot behind the scenes in 
the repository branches NEW_STRUCTURE and NEW_CODEGEN.

The next wxGlade release will use a much simpler internal data structure 
that will make it easier to maintain and hopefully also to contribute 
pull requests.

Also, it will generate code with a different structure.
The generated code looks more like the code that a human being would 
create instead of being split into __init__, __set_properties and 
__do_layout.

E.g. a button is created, the properties are set and then it is added to 
the sizer.

         self.button_database = wx.Button(self.MeasurementPanel, 
wx.ID_ANY, ">")
         self.button_database.SetMinSize((20, -1))
         sizer_15.Add(self.button_database, 0, wx.ALIGN_CENTER_VERTICAL, 0)

The advantage is that the code is IMHO easier to read. Also, labels and 
other controls are created in the natural order and so screen readers 
like NVDA will correctly identify the label that belongs to e.g. a text 
control next to it.

I would appreciate if some of you would try out the repository branch 
NEW_CODEGEN.

If you don't use git, you should be able to download the branch from 
https://github.com/wxGlade/wxGlade/archive/NEW_CODEGEN.zip

With my Python projects, the generated code seems to work fine. I could 
not check whether C++/LISP/PERL code is still correct.

Once I have feedback that there are no major issues and maybe also about 
possible improvements, I will merge the branch into master. At that 
point I will also adjust all the test cases.

After that, I will ask you for more feedback about some features / 
behaviour of the new version.


In the new version, e.g. a panel can be directly added to a frame 
without using a sizer inbetween. (wx never required this.)
As long as you don't use that feature, the .wxg file should be 100% 
compatible between 0.9 and NEW_CODEGEN.


In parallel, I will maintain the 0.9.x releases for some time.


Regards,

Dietmar




_______________________________________________
wxGlade-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxglade-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.