X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6158f936ec6b3edfff2e0918ff44ea18e1ed7d2b..8bcf4c86f423035eca565571b4cbafd2e60e4c3d:/wxPython/docs/MigrationGuide.html diff --git a/wxPython/docs/MigrationGuide.html b/wxPython/docs/MigrationGuide.html index b25cd127e8..e4a6f1b3f8 100644 --- a/wxPython/docs/MigrationGuide.html +++ b/wxPython/docs/MigrationGuide.html @@ -174,12 +174,9 @@ app.MainLoop()

You shouldn't need to migrate all your modules over to use the new package and names right away as there are modules in place that try to provide as much backwards compatibility of the names as possible. If -you rewrote the above sample using "from wxPython.wx import *", the +you rewrote the above sample using "from wxPython.wx import * ", the old wxNames, and the old style of event binding it will still work just fine.

-
-

System Message: WARNING/2 (MigrationGuide.txt, line 189); backlink

-Inline emphasis start-string without end-string.

New wx.DC Methods

@@ -258,18 +255,19 @@ BlitXY(xdest, ydest, width, height, sourceDC, xsrc, ysrc, Blit(destPt, size, sourceDC, srcPt, rop = wxCOPY, useMask = FALSE, srcPtMask = wx.DefaultPosition) -SetClippingRegionXY SetClippingRegion(x, y, width, height) +SetClippingRegionXY(x, y, width, height) SetClippingRegion(point, size) SetClippingRect(rect) SetClippingRegionAsRegion(region); -

If you have code that draws on a DC you will get errors because of -these changes, but it should be easy to fix the code. You can either -change the name of the Type B method called to the names shown -above, or just add parentheses around the parameters as needed to turn -them into tuples and let the SWIG typemaps turn them into the wx.Point -or wx.Size object that is expected. Then you will be calling the new -Type A method. For example, if you had this code before:

+

If you have code that draws on a DC and you are using the new wx +namespace then you will get errors because of these changes, but +it should be easy to fix the code. You can either change the name of +the Type B method called to the names shown above, or just add +parentheses around the parameters as needed to turn them into tuples +and let the SWIG typemaps turn them into the wx.Point or wx.Size +object that is expected. Then you will be calling the new Type A +method. For example, if you had this code before:

 dc.DrawRectangle(x, y, width, height)
 
@@ -287,6 +285,14 @@ dc.DrawRectangle(p.x, p.y, s.width, s.height)
 dc.DrawRectangle(p, s)
 
+

Now before you start yelling and screaming at me for breaking all your +code, take note that I said above "...using the new wx namespace..." +That's because if you are still importing from wxPython.wx then there +are some classes defined there with Draw and etc. methods that have +2.4 compatible signatures. However if/when the old wxPython.wx +namespace is removed then these classes will be removed too so you +should plan on migrating to the new namespace and new DC Draw methods +before that time.

Building, Extending and Embedding wxPython

@@ -367,7 +373,7 @@ wxPyTypeCast at all.