X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c66cd08ab73f5cabafd533e87650234422f4415c..0967b57b85518167b93f64ccecb5a1b5dc2b2c51:/wxPython/docs/MigrationGuide.html?ds=sidebyside diff --git a/wxPython/docs/MigrationGuide.html b/wxPython/docs/MigrationGuide.html index 215018ffa1..8c00b5a60a 100644 --- a/wxPython/docs/MigrationGuide.html +++ b/wxPython/docs/MigrationGuide.html @@ -3,9 +3,291 @@
- +The wxWindows project and library is now known as wxWidgets. Please see here for more details.
This won't really affect wxPython all that much, other than the fact @@ -25,8 +307,8 @@ so mail list, CVS, and etc. addresses have also changed. We're going to try and smooth the transition as much as possible, but I wanted you all to be aware of this change if you run into any issues.
The import-startup-bootstrap process employed by wxPython was changed such that wxWidgets and the underlying gui toolkit are not initialized until the wx.App object is created (but before wx.App.OnInit @@ -51,8 +333,8 @@ class constructors and also many toplevel functions and static methods will now check that a wx.App object has already been created and will raise a wx.PyNoAppError exception if not.
wxPython is now using SWIG 1.3.x from CVS (with several of my own customizations added that I hope to get folded back into the main SWIG distribution.) This has some far reaching ramifications:
@@ -79,8 +361,8 @@ class type using something like isinstance(obj, wx.FooPtr) you will need to change it to isinstance(obj, wx.Foo).All of the EVT_* functions are now instances of the wx.PyEventBinder class. They have a __call__ method so they can still be used as functions like before, but making them instances adds some @@ -132,11 +414,11 @@ values:
item = menu.Append(-1, "E&xit", "Terminate the App") self.Bind(wx.EVT_MENU, self.OnExit, item) -2. +2. item = menu.Append(wx.ID_EXIT, "E&xit", "Terminate the App") self.Bind(wx.EVT_MENU, self.OnExit, item) -3. +3. menu.Append(wx.ID_EXIT, "E&xit", "Terminate the App") self.Bind(wx.EVT_MENU, self.OnExit, id=wx.ID_EXIT) @@ -167,8 +449,8 @@ def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY): """The second phase of the wx Namespace Transition has begun. That means that the real names of the classes and other symbols do not have the 'wx' prefix and the modules are located in a Python package named @@ -225,8 +507,8 @@ 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.
[Changed in 2.5.2.x] In wxPython 2.5.1.5 there was a new implementation of the wx.DC Draw and other methods that broke backwards compatibility in the name of consistency. That change has @@ -240,7 +522,7 @@ FloodFill(self, x, y, colour, style = wx.FLOOD_SURFACE) FoodFillPoint(self, pt, colour, style = wx.FLOOD_SURFACE) GetPixel(self, x,y) -GetPixelPoint(self, pt) +GetPixelPoint(self, pt) DrawLine(self, x1, y1, x2, y2) DrawLinePoint(self, pt1, pt2) @@ -289,7 +571,7 @@ DrawRotatedTextPoint(self, text, pt, angle) bool Blit(self, xdest, ydest, width, height, sourceDC, xsrc, ysrc, rop = wx.COPY, useMask = False, xsrcMask = -1, ysrcMask = -1) -BlitPointSize(self, destPt, sz, sourceDC, srcPt, rop = wx.COPY, +BlitPointSize(self, destPt, sz, sourceDC, srcPt, rop = wx.COPY, useMask = False, srcPtMask = wxDefaultPosition) @@ -299,8 +581,8 @@ SetClippingRegionAsRegion(self, region) SetClippingRect(self, rect)
wxPython's setup.py script now expects to use existing libraries for the contribs (gizmos, stc, xrc, etc.) rather than building local copies of them. If you build your own copies of wxPython please be @@ -339,8 +621,8 @@ are wrapped in the standard Py_(BEGIN|END)_ALLOW_THERADS may result in wx event handlers being called (such as during the call to os.startfile.)
If you use the Precreate/Create method of instantiating a window, (for example, to set an extended style flag, or for XRC handlers) then there is now a new method named PostCreate to help with transplanting @@ -355,8 +637,8 @@ class MyDialog(wx.Dialog): self.PostCreate(pre)
The hack allowing the old "option" keyword parameter has been removed. If you use keyword args with wx.Sizer Add, Insert, or Prepend methods then you will need to use the proportion name instead of @@ -473,8 +755,8 @@ This can be done by calling SetBe
Added wx.PlatformInfo which is a tuple containing strings that describe the platform and build options of wxPython. This lets you know more about the build than just the __WXPORT__ value that @@ -495,8 +777,8 @@ way. If there are any other platform/toolkit/build flags that make sense to add to this tuple please let me know.
BTW, wx.Platform will probably be deprecated in the future.
Lindsay Mathieson's newest wxActiveX class has been wrapped into a new extension module called wx.activex. It is very generic and dynamic and should allow hosting of arbitray ActiveX controls within your @@ -585,7 +867,7 @@ new window from being opened by the IE web browser control you can do this in the handler for the iewin.EVT_NewWindow2 event:
def OnNewWindow2(self, evt): - evt.Cancel = True + evt.Cancel = True
So how do you know what methods, events and properties that an ActiveX control supports? There is a funciton in wx.activex named GetAXInfo @@ -596,8 +878,8 @@ output appended as a comment to the modules produced by the genaxmodule tool. Beyond that you'll need to consult the docs provided by the makers of the ActiveX control that you are using.
Prior to 2.5 the PNG image handler would convert all alpha channel information to a mask when the image was loaded. Pixels that were more than halfway transparent would be made fully transparent by the @@ -619,8 +901,8 @@ fully transparent.
[Changed in 2.5.2.x]
The wx.ogl module was deprecated in version 2.5.2 in favor of the new Python port of the OGL library located at wx.lib.ogl contributed by @@ -664,11 +946,11 @@ class MyDividedShape(ogl.DividedShape): ... def OnSizingEndDragLeft(self, pt, x, y, keys, attch): ogl.DividedShape.OnSizingEndDragLeft(self, pt, x, y, keys, attch) - ... + ...
Instead of over a dozen separate extension modules linked together into a single extension module, the "core" module is now just a few extensions that are linked independently, and then merged together @@ -718,8 +1000,8 @@ the objects in these modules only via the wx or wxPython.wx packages:
The help module no longer exists and the classes therein are now part of the core module imported with wxPython.wx or the wx package.
[Changed in 2.5.3.x]
wx.TaskbarIcon now works on all three platforms, although for wxGTK it depends on support from the Window Manager. On OS X the icon replaces @@ -747,8 +1029,8 @@ wx.Dialogs.) If you don't destroy it then wxWidgets will assume that you want the app to keep running with just the icon in the task bar and the MainLoop will not exit.
[Changed in 2.5.3.x]
Starting with 2.5.3.0 the Unicode versions of wxPython will no longer have a 'u' appended to the fourth component of the version number. @@ -761,8 +1043,8 @@ if "unicode" in wx.PlatformInfo: ...
[Changed in 2.5.3.x]
Starting with 2.5.3.0 the wx and wxPython package directories will be installed in a subdirectory of the site-packages directory, instead of @@ -803,8 +1085,8 @@ version of wxPython that supports this, but there will be.
Please see this wiki page for more details, HowTo's and FAQ's: http://wiki.wxpython.org/index.cgi/MultiVersionInstalls
wxPyDefaultPosition and wxPyDefaultSize are gone. Use the wxDefaultPosition and wxDefaultSize objects instead.
Similarly, the wxSystemSettings backwards compatibiility aliases for