mail test from Jean-Michel Fauth

jmf wrote:

I apologize for this mail. I can't post to the wxPython list.

That's odd. It seems to be working fine for me an many others. I've forwarded it to the list for you.

I am cleaning the code of some large applications I have. The plan is to
use sizers in every frame, panel, dialog window (Good idea, isn't it?).

Yes. I agree.

1. In the declaration of the controls, should I use wx.DefaultPosition
and wx.DefaultSize or should I drop them (seems logical)?

w1 = wx.Window(self, wx.NewId(), wx.DefaultPosition, wx.DefaultSize)
or
w1 = wx.Window(self, wx.NewId())

I'd drop them. That's the beauty of python's default values. The only reason to use them is because you need to specify later arguments (such as style), but if you use keywords you don't need to do that either.

Also, for most window constructors, you can leave the ID off too, leaving you with:

w1 = wx.Window(self)

Very simple and clean.

2. StaticLine. The default thickness of the line is 2. It seems, this
value has changed in the different wxPython releases. Am I wrong ?

I have no idea. I suppose it's best to specify the thickness you want, so as to be insulated against future changes.

3. Sometimes one wishes a size value for an item/control, that is
different from the default value. Where is the best place to define it;
at the level of the control declaration or in the sizer manager with an
SetItemMinSize().

I'd put it in the control declaration, unless it will change later, or be based on a value unknown at creation time.

4. Just a final side note. The GridBagSizer does not seem to be very
healthy. Coding mistakes have crashed Python (win2k, Py242, wxPy2621).
Any reports about this ?

I haven't seen any, but I haven't used it much myself.

Some code...

A few changed I'd suggest:
> w1 = wx.Window(self, wx.NewId())
           w1 = wx.Window(self)

         staline1 = wx.StaticLine(self, wx.NewId(), style=wx.LI_HORIZONTAL)

           staline1 = wx.StaticLine(self, style=wx.LI_HORIZONTAL)

         b1 = wx.Button(self, wx.NewId(), '&OK')
         b2 = wx.Button(self, wx.NewId(), '&Cancel')

Use standard IDs for these:
           b1 = wx.Button(self, wx.ID_OK, '&OK')
           b2 = wx.Button(self, wx.ID_CANCEL, '&Cancel')

(you can find these under "Stock Items" in the reference manual)

         hsizer1.Add(w1, 1, wx.EXPAND | wx.ALL, b)

The consensus seems to be to leave out space around the "|":
           hsizer1.Add(w1, 1, wx.EXPAND|wx.ALL, b)

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Christopher Barker wrote:

jmf wrote:

I apologize for this mail. I can't post to the wxPython list.

That's odd. It seems to be working fine for me an many others. I've forwarded it to the list for you.

This is the 3rd report of this problem, plus a different problem reported at the same time. There is definitely something screwy going on. The only change I made was to strip any existing Reply-To headers from the incoming messages since the maillist puts it's own Reply-To in the outgoing messages. I have no idea why that would cause a problem like this, but I am looking into it.

3. Sometimes one wishes a size value for an item/control, that is
different from the default value. Where is the best place to define it;
at the level of the control declaration or in the sizer manager with an
SetItemMinSize().

I'd put it in the control declaration, unless it will change later, or be based on a value unknown at creation time.

One additional note here, for most (or perhaps all now) stock wx controls specifying the size in the constructor does set the minsize that the sizers will use later for layout, so that is by design the natural place to specify it.

4. Just a final side note. The GridBagSizer does not seem to be very
healthy. Coding mistakes have crashed Python (win2k, Py242, wxPy2621).
Any reports about this ?

Do you have a simple sample that shows the crash?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

This is the 3rd report of this problem, plus a different problem reported at the same time. There is definitely something screwy going on. The only change I made was to strip any existing Reply-To headers from the incoming messages since the maillist puts it's own Reply-To in the outgoing messages. I have no idea why that would cause a problem like this, but I am looking into it.

On Monday, I stopped receiving wxPython-users messages for a period of about 6 hours. I had posted a message (my screencast announcement) in the morning but never saw it post there. Then, thinking that I must have been unsubscribed somehow, I resubscribed. A few hours later I got a slew of messages all at once (20+).

It sounds to me like mail server problems, not listserve configuration.

···

--
Paul

Paul McNett wrote:

Robin Dunn wrote:

This is the 3rd report of this problem, plus a different problem reported at the same time. There is definitely something screwy going on. The only change I made was to strip any existing Reply-To headers from the incoming messages since the maillist puts it's own Reply-To in the outgoing messages. I have no idea why that would cause a problem like this, but I am looking into it.

On Monday, I stopped receiving wxPython-users messages for a period of about 6 hours. I had posted a message (my screencast announcement) in the morning but never saw it post there. Then, thinking that I must have been unsubscribed somehow, I resubscribed. A few hours later I got a slew of messages all at once (20+).

It sounds to me like mail server problems, not listserve configuration.

I think that was separate problem. The MX server was unreachable during that time, but the change I mentioned and also the reports of rejected messages happened starting on Wednesday. So it seems to me that either the latter two are related in some way or the admins did something else on Wednesday that screwed up the mail handling for a few people but not everybody.

Still looking...

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!