2.9.3 any chance this could make it? - SizedScrolledPanel

Kevin and/or Robin,

Any chance this patch or similar might make it into 2.9.3?

Following notes from my original post of this to the user list.

Werner

My initial go was to basically rename existing sc.SizedPanel to
sc.SizedParent and get rid of the __init__ code, however I couldn't make
the new sc.SizedPanel (which was basically just the old __init__ code to
see the AddChild, SetSizerType and GetSizerType methods.

Anyhow even if above worked I am not aware of a way to handle the
following type of code "sp.ScrolledPanel.SetSizer(self, sizer)" in
SizedParent that always the correct base class would be called.

If anyone can point me to some documentation/sample code on how this can
be done I have another look.

In the mean time attached is a proposed patch using a different way
which still has a minimal amount of duplicated code in the different
sub-classes.

I am putting the helmet on - so please comment on this;-)

sizedcontrol1.patch (3.18 KB)

Hi Werner,

The problem on my end is basically that I have been swamped the past few weeks, and it looks like it will continue for at least another week or two. From what I've seen of the code, I'm definitely on board with getting it into 2.9.3, and if Robin doesn't beat me to it, I'll try to get it in when I have time.

Thanks,

Kevin

···

On Nov 2, 2011, at 6:58 AM, werner wrote:

Kevin and/or Robin,

Any chance this patch or similar might make it into 2.9.3?

Following notes from my original post of this to the user list.

Werner

My initial go was to basically rename existing sc.SizedPanel to
sc.SizedParent and get rid of the __init__ code, however I couldn't make
the new sc.SizedPanel (which was basically just the old __init__ code to
see the AddChild, SetSizerType and GetSizerType methods.

Anyhow even if above worked I am not aware of a way to handle the
following type of code "sp.ScrolledPanel.SetSizer(self, sizer)" in
SizedParent that always the correct base class would be called.

If anyone can point me to some documentation/sample code on how this can
be done I have another look.

In the mean time attached is a proposed patch using a different way
which still has a minimal amount of duplicated code in the different
sub-classes.

I am putting the helmet on - so please comment on this;-)

--
To unsubscribe, send email to wxPython-dev+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-dev?hl=en<sizedcontrol1\.patch>

Please also add to the demo a sample of using SizedScrolledPanel. And adding docstrings to the new classes (or others if you want) if you're able would certainly be a Good Thing.

···

On 11/2/11 6:58 AM, werner wrote:

In the mean time attached is a proposed patch using a different way
which still has a minimal amount of duplicated code in the different
sub-classes.

I am putting the helmet on - so please comment on this;-)

--
Robin Dunn
Software Craftsman

Robin and Kevin,

Thanks, and I hope you don't mind that I reminded you.

In the mean time attached is a proposed patch using a different way
which still has a minimal amount of duplicated code in the different
sub-classes.

I am putting the helmet on - so please comment on this;-)

Please also add to the demo a sample of using SizedScrolledPanel.

Will try to get this done within the next few days.

  And adding docstrings to the new classes (or others if you want) if you're able would certainly be a Good Thing.

I am not the best documenter, but I will give it a try and you can always just throw it away;-) .

I assume you will hold of on this one until I submit a new with doc strings.

Werner

···

On 11/02/2011 05:27 PM, Robin Dunn wrote:

On 11/2/11 6:58 AM, werner wrote:

Yeah, you can make a new patch that includes both sets of changes.

···

On 11/2/11 9:50 AM, werner wrote:

Robin and Kevin,

Thanks, and I hope you don't mind that I reminded you.

On 11/02/2011 05:27 PM, Robin Dunn wrote:

On 11/2/11 6:58 AM, werner wrote:

In the mean time attached is a proposed patch using a different way
which still has a minimal amount of duplicated code in the different
sub-classes.

I am putting the helmet on - so please comment on this;-)

Please also add to the demo a sample of using SizedScrolledPanel.

Will try to get this done within the next few days.

And adding docstrings to the new classes (or others if you want) if
you're able would certainly be a Good Thing.

I am not the best documenter, but I will give it a try and you can
always just throw it away;-) .

I assume you will hold of on this one until I submit a new with doc
strings.

--
Robin Dunn
Software Craftsman

In the mean time attached is a proposed patch using a different way
which still has a minimal amount of duplicated code in the different
sub-classes.

I am putting the helmet on - so please comment on this;-)

Please also add to the demo a sample of using SizedScrolledPanel.

Done

And adding docstrings to the new classes (or others if you want) if you're able would certainly be a Good Thing.

Done, please critic.

Werner

sizedcontrolDemo.patch (4.89 KB)

sizedcontrol3.patch (7.35 KB)

···

On 11/02/2011 05:27 PM, Robin Dunn wrote:

On 11/2/11 6:58 AM, werner wrote:

Hi Werner,

In the mean time attached is a proposed patch using a different way

which still has a minimal amount of duplicated code in the different

sub-classes.

I am putting the helmet on - so please comment on this;-)

Please also add to the demo a sample of using SizedScrolledPanel.
Done
And adding docstrings to the new classes (or others if you want) if you’re able would certainly be a Good Thing.

Done, please critic.

I’ll add just a comment on the docstrings: when you introduce a newline character on the :param: declaration, you should add a space to align the first character of the newline with the “p” or :param:, i.e. not like this:

:param prop: valid strings are “proportion”, “hgrow”, “vgrow”,

“align”, “halign”, “valign”, “border”, “minsize” and “expand”

But like this:

:param prop: valid strings are “proportion”, “hgrow”, “vgrow”,

“align”, “halign”, “valign”, “border”, “minsize” and “expand”

I know it seems like a minor issue but in the past I have seen Sphinx complaining about incorrect indentation on newline characters for docstrings.

Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”
http://xoomer.alice.it/infinity77/

···

On 3 November 2011 09:31, werner wrote:

On 11/02/2011 05:27 PM, Robin Dunn wrote:

On 11/2/11 6:58 AM, werner wrote:

Hi Andrea,

···

On 11/03/2011 09:48 AM, Andrea Gavana wrote:

I know it seems like a minor issue but in the past I have seen Sphinx complaining about incorrect indentation on newline characters for docstrings.

I fixed the two doc strings here but will wait to resubmit for any other remarks.

Just have to convince Cody that Editra handles this automatically:-) .

Thanks for looking at it.
Werner

Kevin, Robin,

sizedcontrol4.patch (7.35 KB)

···

On 11/03/2011 10:13 AM, werner wrote:

Hi Andrea,

On 11/03/2011 09:48 AM, Andrea Gavana wrote:

I know it seems like a minor issue but in the past I have seen Sphinx complaining about incorrect indentation on newline characters for docstrings.

I fixed the two doc strings here but will wait to resubmit for any other remarks.

Just have to convince Cody that Editra handles this automatically:-) .

Updated patch as suggested by Andrea for doc string compatibility with Sphinx.

Werner