[ANN] wxPython 2.4.1.2

Announcing

···

----------

I'm pleased to announce the 2.4.1.2 release of wxPython, now available
for download at http://wxpython.org/download.php or
http://sourceforge.net/project/showfiles.php?group_id=10718&release_id=166530

What is wxPython?
-----------------

wxPython is a GUI toolkit for the Python programming language. It
allows Python programmers to create programs with a robust, highly
functional graphical user interface, simply and easily. It is
implemented as a Python extension module that wraps the popular
wxWindows cross platform GUI library, which is written in C++.

wxPython is a cross-platform toolkit. This means that the same program
will usually run on multiple platforms without modifications.
Currently supported platforms are 32-bit Microsoft Windows, most Linux
or other unix-like systems, and Macintosh OS X.

New with this release is an experimental build of wxPython using GTK+
2.x for the underlying GUI platform and it is also built with UNICODE
support turned on. The RPMs for this build were made on a Mandrake
9.1 system but should probably work on other distributions with very
up to date libraries. If not, an SRPM is included that can be used to
rebuild the RPM on your system. If you experiment with this build
please send feedback to the wxPython-users mail list. The files are
currently available only on the SourceForge download page, look for
the wxPythonGTK2 files at the bottom:

https://sourceforge.net/project/showfiles.php?group_id=10718&release_id=166532

Changes in 2.4.1.2
------------------

Added wxScrolledPanel from Will Sadkin

Added SetShape method to top level windows (e.g. wxFrame.)

Changed wxSWIG to not generate Python code using apply, (since it will
be deprecated in the future) wxSWIG will use spam(*args, **kw) syntax
instead. Also changed the generated __repr__ methods to be a bit more
informative.

Made the version number information more robust and uh, informative.
Also added asserts to check that the major.minor versions of wxPython
and wxWindows match.

Added the new wx "renamer" package that will dynamically import from
the wxPython package and rename wxFooBar --> FooBar. That means that
people can do imports without "import *" and can use names like
wx.Frame instead of wx.wxFrame. This is phase 1 of a full transition
to the new namespace.

Updated Scintilla to 1.52. I also changed it to use wxListCtrl
instead of wxListBox for the AutoComplete window, added the ability to
use custom bitmaps in the margin and in the AutoComplete windows, and
worked out how to do proper clipping of child windows on wxGTK.

Patrick O'Brien's PyCrust package has been renamed to Py and now
includes several new tools. As part of the change the location of the
pacakge has changed as well, it is now accessible as "from wxPython
import py" (or "from wx import py" using the new namespace.) There
are still some transition modules in the wxPython.lib.PyCrust package
that will issue a warning and then import what is needed from the new
package. These will be removed in a future release.

Added __nonzero__ method to wxTreeItemId, wxBitmap, wxImage, wxFont,
and most other classes that have an Ok or IsOK method. This allows
code like "if obj: ..." to be the same as "if obj.IsOk(): ..."

Toolbars on wxMac can now have controls on them.

Added wxPython.lib.analogclock module based on samples that were
passed back and forth on wxPython-users a while back.

Added masked edit controls (wxPython.lib.maskededit) by Jeff Childers
and Will Sadkin. Updated wxTimeCtrl to use MaskedEdit.

When the __class__ of a dead object is replaced with _wxPyDeadObject
the __del__ of the original class is now called first.

Added wxTreeListCtrl. (Looks like a wxTreeCtrl embedded in a
wxListCtrl, but actually is just giving multiple columns to a
wxTreeCtrl.)

Added wxFutureCall, a subclass of wxTimer that makes it easy to delay
a call to any Python callable object.

Added wxPy versions of wxPrintPreview, wxPreviewFrame, and
wxPreviewControlBar so they can be derived from in Python and be able
to override the C++ virtual methods.

Simplified how the wxSizer methods are wrapped, changed the name of
the "option" parameter to "proportion" to match the docs ("option" is
still accepted for compatibility, but this will go away in a future
release,) SetItemMinSize can now take a wxSize (or 2-tuple) parameter,
and Spacers can be specified with a wxSize (or 2-tuple) parameter

Added wxCursorFromBits.

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

I'm pleased to announce the 2.4.1.2 release of wxPython, now available

Congrats, Robin!

Thank you very much Robin and all others who have contributed to this
release.

The strange wxGrid.GetSelectedRows() (or should I say
wx.Grid.GetSelectedRows() :wink: behaviour still seems to be present
however. I have attached a sample (a two-line modification to
GridSimple.py (diff also attached)) that illustrates this.

Select multiple rows by dragging the mouse along the row headers on the
left hand side, or by keeping the control key depressed while clicking
on row headers. Now right click on a cell: it will print the list of
selected rows. This is all as expected.

Now select multiple rows by shift-clicking on a row header. Right click
on a cell and note that the selected rows list is empty. Also, click on
the top left corner header of the grid to select the complete grid.
Right click on a cell and note that the selected rows list is empty.
Also, after calling wx.Grid.SelectAll(), GetSelectedRows() is also
empty.

Robin, is this desired behaviour, or is it a glitch?

Thanks once again for the new release!

Best regards,
Charl

GridSimple-SelectedRows.py (8.62 KB)

GridSimple-SelectedRows.py.diff (451 Bytes)

···

On Fri, 2003-06-20 at 01:54, Robin Dunn wrote:

I'm pleased to announce the 2.4.1.2 release of wxPython, now available

--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/

Hello, I have a problem with the new release of wxPython (2.4.1.2 on Win2k)
I created wxHtmlWinTagHandler subclass in order to handle some custom tags.
I also created a subclass of wxHtmlWindow, wxHtmlWindowExt, that extends it with some custom methods.
Those methods are called by wxHtmlWinTagHandler using the object returned by self.GetParser().GetWindow().
Well with wxPython 2.4.0.7 I could access wxHtmlWindowExt methods without problems, but now (2.4.1.2) I cannot. Python complains with an AttributeError.

I'm using python 2.2.

Any hints? Was I relying on a bug?

Some code of mine to make things cleared (I hope):

class wxHtmlWindowExt(wxHtmlWindow):
  def __init__(self,parent,id,bScriptWindow=False):
    wxHtmlWindow.__init__(self,parent,id)

  ...
  def GetNewId(self):
    self.nControlBase+=1
    return self.nControlBase

  ...

class wxMyTagHandler(wxHtmlWinTagHandler):
  def __init__(self):
    wxHtmlWinTagHandler.__init__(self)
  ....
  def HandleMyTag(self,tag):
    parser = self.GetParser()
    parent = parser.GetWindow()
    
    nId=parent.GetNewId()

Can somebody help me in understanding this?

Riccardo

Charl P. Botha wrote:

Select multiple rows by dragging the mouse along the row headers on the
left hand side, or by keeping the control key depressed while clicking
on row headers. Now right click on a cell: it will print the list of
selected rows. This is all as expected.

Now select multiple rows by shift-clicking on a row header. Right click
on a cell and note that the selected rows list is empty. Also, click on
the top left corner header of the grid to select the complete grid. Right click on a cell and note that the selected rows list is empty. Also, after calling wx.Grid.SelectAll(), GetSelectedRows() is also
empty.

Robin, is this desired behaviour, or is it a glitch?

I can't find the email right now but I think I asked about this on wx-dev. I seem to recall that it is desired behaviour but I don't remember why. Maybe you can find the message in the wx-dex archive (although the current search engine sucks) or ask about it again there.

···

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

Riccardo wrote:

Hello, I have a problem with the new release of wxPython (2.4.1.2 on Win2k)
I created wxHtmlWinTagHandler subclass in order to handle some custom tags.
I also created a subclass of wxHtmlWindow, wxHtmlWindowExt, that extends it with some custom methods.
Those methods are called by wxHtmlWinTagHandler using the object returned by self.GetParser().GetWindow().
Well with wxPython 2.4.0.7 I could access wxHtmlWindowExt methods without problems, but now (2.4.1.2) I cannot. Python complains with an AttributeError.

I'm using python 2.2.

Any hints? Was I relying on a bug?

No, an incomplete fix to another bug caused this one. I've just fixed it for the next release. Sorry.

···

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

Charl P. Botha wrote:

... more stuff snipped about GetSelectedRows() returning an empty list if
multiple rows have been selected whilst keeping shift depressed.

>Also, after calling wx.Grid.SelectAll(), GetSelectedRows() is also
>empty.
>
>Robin, is this desired behaviour, or is it a glitch?

I can't find the email right now but I think I asked about this on
wx-dev. I seem to recall that it is desired behaviour but I don't
remember why. Maybe you can find the message in the wx-dex archive
(although the current search engine sucks) or ask about it again there.

Robin, it does seem to be a bug. Start here:
http://lists.wxwindows.org/archive/wx-users/msg32381.html
and follow the thread. I understand that if the grid selection mode is not
set to "rows" that the results will be different, but in my case and in the
case documented in the wxwindows mailing list, the grid was set to row
selection mode. If you follow that thread, a fix was found by Bryan Karp
but it doesn't seem to have been followed up.

Unfortunately there's also an American football player called "Bryan Karp",
so google hasn't been helpful in tracking this gentleman down. I have CC'd
wx-users list; I hope my mail gets accepted as I am not subscribed to that
list.

Let's see what happens.

···

On Tue, Jun 24, 2003 at 12:41:56PM -0700, Robin Dunn wrote:

--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/