Re: Beta release: 0.8.0b1

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

On 1/2/2018 5:28 PM, Federico Fanton wrote:
> I'm seeing a small change in behaviour since 0.8.0a9 though: now some 
> (all?) widgets get ALWAYS initialized with the "style" parameter, even 
> when there's no "style" checkbox enabled inside the GUI designer.

This was a small, but very old bug, or actually two, that I just 
recently noticed when working on a Frame.

In old revisions up to 0.7.2 e.g. a new Frame was created without any 
style instead of DEFAULT_FRAME_STYLE. This was not obvious, as then wx 
was called without a style argument at all and therefore did use the 
default argument DEFAULT_FRAME_STYLE.
In more recent versions 0.8.0 a Frame had DEFAULT_FRAME_STYLE set and 
code was generated accordingly.
But when you explicitely deactivated this, instead of writing "style=0" 
no argument was written and so still style=wx.DEFAULT_FRAME_STYLE would 
have been assumed by wx.
There was no way to have a widget with style=0.

I thought it was the best to finally fix this, even though many people 
would not have noticed it.


Now you can also supply a style as the argument is calculated as follows:
     kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE

where previously the user argument would have been overwritten:
**kwds["style"] = wx.DEFAULT_FRAME_STYLE

(from feature request #41)


I intended to include a note in the announcement, but finally I forgot 
to do so. Sorry for the confusion.
I thought about something like an import assistant, but probably this 
would be more effort than manually adjusting the affected projects.
There should not be too many and the required fixes should be obvious.

Regards,

Dietmar

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
wxGlade-general mailing list
wxGlade-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
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.