2.5.1p5 preview release: some tests

Hi all

Some more news, win98se, Py 2.3.3, wxPy 2.5.latest

···

--------------------------------------------------------------

- Starting the demo, the log window shows this message:
Debug: ..\..\src\msw\dc.cpp(2035): 'StretchDIBits' failed with error
0x00000057 (paramètre incorrect.).
(paramètre incorrect.) == incorrect parameter
I did no localize the source of the error. I get this error msg
when
o I resize the demo main frame
o I move one of the splitter bar in the main window.
o I click on a tree item.
o I move some frames or dialogs in the demo like, wxDialog, wxToolbar
demo frame, ...
Note that the same error msg was appearing in wxPy 2.5.1.0p4.

Is that a sequence of event, or does any one of them cause that to happen?
Doesn't appear under W2K here if the latter.

I made some more tests.

- wxPy2424 demo with wxPy2424, no problem
- wxPy2424 demo with wxPy25, problem as above
- wxPy25 demo with wxPy25, problem as above

That seems to indicate, the issue lies in a wxPy lib(s)
and not in the demo application.

Is that a sequence of event, or does any one of them cause that
to happen?

No. I disabled all the events (main.py) except the one in the splash
screen class that launches the demo: same issue.

But I noticed the following:

If I comment the line ~600
    wx.Log_SetActiveTarget(MyLog(self.log))
the messages are displayed in MessageBoxes. The above issue
does no more appear. It looks like the MessageBox is "eating"
a pending event. Note that the first appearing msg is "window handle:
<integer>", the other msgs are "normal" msgs like "running demo
wxListbox.py"

If I activate the lines
    # for serious debugging
    wx.Log_SetActiveTarget(wx.LogStderr())
    wx.Log_SetTraceMask(wx.TraceMessages)
the above debug message is present and it is send to stderr.
That's ok, I mean, depite the error, it is logical.

The main issue appears when I click on the "Demo code" notebook
page, I get the debug message over and over because the demo app
goes in a infinite loop. It can be the log window or stderr.
I should kill the demo/process from within my editor.

Also notice that if I comment the line
    wx.Log_SetActiveTarget(MyLog(self.log))
the stc control holding the code is working and reacting
nicely. Using the log, the stc reacts very slowly - I have
time to see a "repaint" of the ctrl.

I tryied to remove any reference to the log class. This
implies to many change in the main.py code, so I gave up :frowning:

--------------------------------------------------------------

-ActiveX wrappers Acrobat and IE: demo crashes.

No crash here, though.

Let's forget it for the while. This was always an issue
on my platform. I do not know if it is a win, Python,
Acrobat or a wxPython problem.

--------------------------------------------------------------

- May I suggest to use the "official" Python boolean type True/False
in the demo.

We're getting it there, but in this case:

...
...

are essentially the same, the code would become a lot less readable. Using
numerics for all four states makes it more consistent and readable.

Mea culpa. You are right. This was a bad example. No, I was
mainly thinking about defs returning 0 or not(0), instead of
True or False. It's not very important.

--------------------------------------------------------------

- Colour Select: the button corresponding to
the label 'With a label' is too small, the text is truncated.

I suspect this is a problem in the colorselect library. I'll make a note of
it.

No. Just define a size for the right button.
file: ColourSelect.py line 72

("With a Label", (127, 0, 255), (80, -1), "Colour..."),
instead of
("With a Label", (127, 0, 255), wx.DefaultSize, "Colour..."),

A value of 80 is ok.

--------------------------------------------------------------

- MaskedEditControls: demo crashes

Ditto, no crash here.

In my editor:
  ...
  File "C:\Python23\Lib\site-packages\wxPython\demo\MaskedEditControls.py", line 632, in __init__
    win = demoPage2(self, log)
  File "C:\Python23\Lib\site-packages\wxPython\demo\MaskedEditControls.py", line 202, in __init__
    grid.Add( mctl.wxMaskedCtrl( self, -1, "",
AttributeError: 'module' object has no attribute 'wxMaskedCtrl'
Debug: ..\..\src\msw\dc.cpp(2035): 'StretchDIBits' failed with error 0x00000057 (paramètre incorrect.).

Probably wxMaskedCtrl instead of wx.
See final note.

--------------------------------------------------------------

- wxMultiSash: demo crashes

Not under W2K, though.

Sorry it is also ok here.
The problem is that I get sometimes the Unhandled Exception message box.
It seems this message is not connected to a particular
demo, but happens when ...?

--------------------------------------------------------------

A final note:

To be sure the demo is running with the new namespace, I keep
only the wx subdir and rename wxPython to wxPythonXXX.
I think this is one of the best way to check if an app
is a pure wxPy2.5 app.
Did you try this?

Regards.

jmf

PS I forgot to say, I am pleased the demo code is displayed with a
fixed pitch font.

[[snip]]

-ActiveX wrappers Acrobat and IE: demo crashes.

No crash here, though.

Let's forget it for the while. This was always an issue
on my platform. I do not know if it is a win, Python,
Acrobat or a wxPython problem.

Have you tried upgrading your pythonwin extensions to the latest version? I know that older versions of Pythonwin caused crashes when trying to use ActiveX on Windows 98, but I think the problem was resolved.

Thanks,

Kevin

···

On Dec 29, 2003, at 8:45 AM, Jean-Michel Fauth wrote:

>> - Starting the demo, the log window shows this message:
>> Debug: ..\..\src\msw\dc.cpp(2035): 'StretchDIBits' failed with error
>> 0x00000057 (paramètre incorrect.).
>> (paramètre incorrect.) == incorrect parameter

- wxPy2424 demo with wxPy2424, no problem
- wxPy2424 demo with wxPy25, problem as above
- wxPy25 demo with wxPy25, problem as above

That seems to indicate, the issue lies in a wxPy lib(s)
and not in the demo application.

Agreed; the nature of the message indicates it's coming from somewhere deep
inside.

If I comment the line ~600
    wx.Log_SetActiveTarget(MyLog(self.log))
the messages are displayed in MessageBoxes. The above issue
does no more appear. It looks like the MessageBox is "eating"
a pending event. Note that the first appearing msg is "window handle:
<integer>", the other msgs are "normal" msgs like "running demo
wxListbox.py"

Also notice that if I comment the line
    wx.Log_SetActiveTarget(MyLog(self.log))
the stc control holding the code is working and reacting
nicely. Using the log, the stc reacts very slowly - I have
time to see a "repaint" of the ctrl.

I would venture that the common thread for the problem seems to be related
to wx.TextCtrl's. But that's a wild guess.

>> -ActiveX wrappers Acrobat and IE: demo crashes.

>No crash here, though.

Let's forget it for the while. This was always an issue
on my platform. I do not know if it is a win, Python,
Acrobat or a wxPython problem.

My guess is that your ActiveX is where the prob is coming from, but also
verify that the version of Mr. Hammond's win32 package that you have is up
to date, since the demos utilize that package. If this is a prob on Win9x
in general, we should probably try to block it if it can't be fixed.

--------------------------------------------------------------

>> - May I suggest to use the "official" Python boolean type True/False
>> in the demo.

Mea culpa. You are right. This was a bad example. No, I was
mainly thinking about defs returning 0 or not(0), instead of
True or False. It's not very important.

One of the goals here is to communicate 'pythonic' style wherever it doesn't
conflict with wx coding styles, so it's something that *will* be addressed
over time. The demo overall will be getting a rework over the next few
versions. Lots of old code in there that should be updated.

--------------------------------------------------------------

>> - Colour Select: the button corresponding to
>> the label 'With a label' is too small, the text is truncated.

>I suspect this is a problem in the colorselect library. I'll
make a note of
>it.

No. Just define a size for the right button.
file: ColourSelect.py line 72

("With a Label", (127, 0, 255), (80, -1), "Colour..."),
instead of
("With a Label", (127, 0, 255), wx.DefaultSize, "Colour..."),

A value of 80 is ok.

Well, I need to look into this, but my take on 'correct' behavior would be
for the button to reject an invalid value, such as one that made the button
too small for its text and/or bitmap (depending on the button type). But,
bottom line, if wx.Button will let you shoot yourself in the foot I don't
think wx.lib.colourselect would be the right place to address that. OTOH, if
wx.Button *does* reject invalid values (i.e. substitutes its own minimum
size when the given size is too small), then colourselect.py should do that
as well.

If the former, I'll make that change to the demo; if the latter, it
shouldn't be too big a deal to fix in the library.

--------------------------------------------------------------

>> - MaskedEditControls: demo crashes

>Ditto, no crash here.

In my editor:
  ...
  File
"C:\Python23\Lib\site-packages\wxPython\demo\MaskedEditControls.py
", line 632, in __init__
    win = demoPage2(self, log)
  File
"C:\Python23\Lib\site-packages\wxPython\demo\MaskedEditControls.py
", line 202, in __init__
    grid.Add( mctl.wxMaskedCtrl( self, -1, "",
AttributeError: 'module' object has no attribute 'wxMaskedCtrl'
Debug: ..\..\src\msw\dc.cpp(2035): 'StretchDIBits' failed with
error 0x00000057 (paramètre incorrect.).

Probably wxMaskedCtrl instead of wx.

DOH! I went back, there they were! Three instances. Fixed, patch submitted,
thanks muchly.

A final note:

To be sure the demo is running with the new namespace, I keep
only the wx subdir and rename wxPython to wxPythonXXX.
I think this is one of the best way to check if an app
is a pure wxPy2.5 app.
Did you try this?

No, but I like that approach. This will be what I do from this point. Nice
one :slight_smile:

PS I forgot to say, I am pleased the demo code is displayed with a
fixed pitch font.

::grin:: me too :slight_smile:

Jean-Michel Fauth wrote:

- Colour Select: the button corresponding to
the label 'With a label' is too small, the text is truncated.

I suspect this is a problem in the colorselect library. I'll make a note of
it.

No. Just define a size for the right button.
file: ColourSelect.py line 72

No, the default size of the button should take into account the size of the text as well as the border. It should just take a little tweak in wx/lib/colourselect.py.

···

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

No, the default size of the button should take into account the size of
the text as well as the border. It should just take a little tweak in
wx/lib/colourselect.py.

So noted on the wiki, hopefully I'll get a chance to look at it this week.