From: Kevin A. <ka...@us...> - 2004-08-25 18:08:57
|
Update of /cvsroot/pythoncard/PythonCard/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25582/docs Modified Files: migration_guide.txt Log Message: started adding reStructuredText markup, added self.html to keep rendered Index: migration_guide.txt =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/docs/migration_guide.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** migration_guide.txt 25 Aug 2004 17:49:16 -0000 1.4 --- migration_guide.txt 25 Aug 2004 18:08:18 -0000 1.5 *************** *** 1,7 **** Migration Guide ! Last changed 2004-08-14. Introduction The purpose of this guide is to help people migrate their programs written for PythonCardPrototype release 0.7.3.1 to release 0.8. For a complete list of changes, please refer to the changelog.txt file. All the samples and tools included with PythonCard have already been updated to the new API, so you can also look at that code for examples. Some of the documentation included with PythonCard may still refer to the older APIs. If you spot a mistake, please email me at al...@se... and I will update the documentation for the next release. --- 1,10 ---- + =============== Migration Guide + =============== ! Last changed 2004-08-25. Introduction + ------------ The purpose of this guide is to help people migrate their programs written for PythonCardPrototype release 0.7.3.1 to release 0.8. For a complete list of changes, please refer to the changelog.txt file. All the samples and tools included with PythonCard have already been updated to the new API, so you can also look at that code for examples. Some of the documentation included with PythonCard may still refer to the older APIs. If you spot a mistake, please email me at al...@se... and I will update the documentation for the next release. *************** *** 10,21 **** --- 13,27 ---- Minimum Requirements + -------------------- Python 2.3 or later and wxPython 2.5.2.7 or later. Package Name Change + ------------------- The main package name has changed from PythonCardPrototype to PythonCard. Since the package name has been changed it is possible to run older PythonCardPrototype programs even with the new package installed. Resource File Changes + --------------------- The Stack class was removed, so the first line of your .rsrc.py file needs to have the 'stack' and 'Stack' strings replaced with 'application' and 'Application' as shown below. *************** *** 30,33 **** --- 36,40 ---- PythonCardApp Class Renamed + --------------------------- PythonCardApp was renamed to Application. The application initialization and startup code for your module will need to be updated to use the Application class. For example, here's the new code for the minimal sample. *************** *** 38,41 **** --- 45,49 ---- Events + ------ openBackground was renamed to initialize, so rename your on_openBackground event handlers to on_initialize. *************** *** 46,53 **** --- 54,63 ---- New-style Classes and Attributes (Properties) + --------------------------------------------- wxPython now uses new-style classes. This allowed the PythonCard components to be changed to use the property() function for attributes instead of __getattr__ and __setattr__ methods. Once again, this dramatically simplified the framework sources for components. In addition, we were able to remove get/set methods for position, size, foregroundColor, backgroundColor, etc. in the Background and CustomDialog classes and replace those get/set methods with attributes. selection and stringSelection Attributes + ---------------------------------------- The Choice, ComboBox, List, RadioGroup components were updated to use 'selection' and 'stringSelection' attributes instead of mixed-capability 'selected' and 'selection' attributes. If you were using these attributes previously, you will have to update both your source and resource files. *************** *** 55,62 **** --- 65,74 ---- mixedCase Method Names + ---------------------- All methods in PythonCard exposed to user code now use the mixedCase naming style to distinguish PythonCard methods from wxPython, which uses the CamelCase style for method names. In the PythonCard shell, the wxPython method names are suppressed in the auto-complete popup window. wx Import Change + ---------------- All imports from the wxPython.wx package have been changed to use the new wx package. For example: *************** *** 71,91 **** Module Names Changes ! Old New ! ----------------------------- ! config.py configuration.py ! pom.py component.py ! res.py resource.py Added Modules timer.py contains a simple wx.Timer class wrapper. Deleted Modules dispatch.py Dialogs The dialog module is now a thin wrapper around the wx.lib.dialogs module. The biggest change to your code is that the result of dialogs is now a DialogResults class instead of a dictionary. See the dialogs sample for examples of usage, but in general if you had something like result['accepted'] it will now be result.accepted. --- 83,109 ---- Module Names Changes + -------------------- ! :: ! ! Old New ! ----------------------------- ! config.py configuration.py ! pom.py component.py ! res.py resource.py Added Modules + ------------- timer.py contains a simple wx.Timer class wrapper. Deleted Modules + --------------- dispatch.py Dialogs + ------- The dialog module is now a thin wrapper around the wx.lib.dialogs module. The biggest change to your code is that the result of dialogs is now a DialogResults class instead of a dictionary. See the dialogs sample for examples of usage, but in general if you had something like result['accepted'] it will now be result.accepted. *************** *** 97,112 **** --- 115,134 ---- Calendar Component + ------------------ The Calendar component was changed to use the CAL_SEQUENTIAL_MONTH_SELECTION style. A style attribute may need to be added to the Calendar component in future releases to allow different calendar styles to be used. Image Component + --------------- PythonCard now uses wx.lib.statbmp.GenStaticBitmap on GTK for the Image component so that the Image component can get mouse events on all platforms. If you want to use a bitmap with transparency, then you'll also want to use the Image component to get the same appearance on all platforms. StatusBar + --------- statusbar.StatusBar a direct subclass of wx.StatusBar so it is now possible to provide your own StatusBar subclass to use instead of the default. See the createStatusBar method in model.py Miscellaneous + ------------- Renamed stc-styles.rc.cfg to stc-styles.cfg, but this shouldn't impact any user programs. |