Werner wrote:
> Hi,
>
> Enclosed is a patch for floatcanvas which gets rid of deprecation
> warnings, however I am still having the recursion issue I mentioned in
> another thread.
I don't understand the reason for this code:
> +if 'phoenix' in wx.PlatformInfo:
> + wxBitmap = wx.Bitmap
> +else:
> + wxBitmap = wx.wxBitmap
> +
Did you intend for the else clause to use wx.EmptyBitmap?
There is no need for the if statement here:
> + if 'phoenix' in wx.PlatformInfo:
> + PanelSize = N.array(self.GetClientSize(), N.int32)
> + else:
> + PanelSize = N.array(self.GetClientSizeTuple(), N.int32)
The first clause will work with both Classic and Phoenix since wx.Size
provides the magic methods needed to treat the object as a sequence.
You can just remove the dc.BeginDrawing and dc.EndDrawing calls. I
think they've been empty methods since 2.4 or perhaps earlier.
The block in the patch that changes the use of the event binders as
functions to using them with the Bind method can be changed to use the
Bind method for both Classic and Phoenix. No need to conditionalize it.
Finally, unless Chris feels otherwise I don't think we should worry
about maintaining compatibility with both Classic and Phoenix. The
source has been forked in the repository and there isn't any intention
of distributing the Phoenix wx.lib with Classic builds.
--
Robin Dunn
Software Craftsman
http://wxPython.org