You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(45) |
May
(185) |
Jun
|
Jul
(36) |
Aug
(205) |
Sep
(98) |
Oct
(107) |
Nov
(6) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(1) |
Feb
(2) |
Mar
(19) |
Apr
(26) |
May
(18) |
Jun
|
Jul
(12) |
Aug
(16) |
Sep
(22) |
Oct
(7) |
Nov
(11) |
Dec
(74) |
2006 |
Jan
(14) |
Feb
(1) |
Mar
(3) |
Apr
(3) |
May
(14) |
Jun
(5) |
Jul
(20) |
Aug
(10) |
Sep
(1) |
Oct
|
Nov
(4) |
Dec
(1) |
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(14) |
Aug
|
Sep
|
Oct
(6) |
Nov
(1) |
Dec
|
From: Kevin A. <ka...@us...> - 2004-08-30 14:50:18
|
Update of /cvsroot/pythoncard/PythonCard/samples/worldclock In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14090/samples/worldclock Modified Files: worldclock.py Log Message: converted wx.Timer references to timer.Timer and fixed case of methods Index: worldclock.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/worldclock/worldclock.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** worldclock.py 14 Apr 2004 02:38:46 -0000 1.26 --- worldclock.py 30 Aug 2004 14:50:08 -0000 1.27 *************** *** 116,121 **** def on_close(self, event): ! self.clockTimer.Stop() ! self.imageTimer.Stop() event.skip() --- 116,121 ---- def on_close(self, event): ! self.clockTimer.stop() ! self.imageTimer.stop() event.skip() |
From: Kevin A. <ka...@us...> - 2004-08-30 14:42:56
|
Update of /cvsroot/pythoncard/PythonCard/samples/fpop In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12811/samples/fpop Modified Files: fpop.py Log Message: fixed refreshTimer in on_close, switched to timer.Timer Index: fpop.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/fpop/fpop.py,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** fpop.py 15 Aug 2004 17:55:36 -0000 1.47 --- fpop.py 30 Aug 2004 14:42:47 -0000 1.48 *************** *** 92,96 **** import wx ! from PythonCard import configuration, dialog, log, model import dlg_config from preview import Preview --- 92,96 ---- import wx ! from PythonCard import configuration, dialog, log, model, timer import dlg_config from preview import Preview *************** *** 171,176 **** self.doGetNewHeaders() if self.AutoCheck : ! self.refreshTimer = wx.Timer(self.components.btnGetHeaders, -1) ! self.refreshTimer.Start(self.AutoCheckInterval * 60 * 1000) # so how much to wrap and how much to leave raw wxPython? --- 171,176 ---- self.doGetNewHeaders() if self.AutoCheck : ! self.refreshTimer = timer.Timer(self.components.btnGetHeaders, -1) ! self.refreshTimer.start(self.AutoCheckInterval * 60 * 1000) # so how much to wrap and how much to leave raw wxPython? *************** *** 733,737 **** def on_close(self, event): ! self.refreshTimer.Stop() self.popup.Destroy() fpoputil.saveList(os.path.join(self.configPath, WHITELIST_FILENAME), self.whitelist) --- 733,738 ---- def on_close(self, event): ! if hasattr(self, 'refreshTimer'): ! self.refreshTimer.stop() self.popup.Destroy() fpoputil.saveList(os.path.join(self.configPath, WHITELIST_FILENAME), self.whitelist) |
From: Kevin A. <ka...@us...> - 2004-08-27 02:03:34
|
Update of /cvsroot/pythoncard/PythonCard/tools/codeEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17381/tools/codeEditor Modified Files: restEditor.py restEditor.rsrc.py Log Message: simplistic save for HTML in preview window Index: restEditor.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/codeEditor/restEditor.rsrc.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** restEditor.rsrc.py 24 Aug 2004 14:19:31 -0000 1.5 --- restEditor.rsrc.py 27 Aug 2004 02:03:25 -0000 1.6 *************** *** 38,41 **** --- 38,46 ---- }, {'type':'MenuItem', + 'name':'menuFileSaveHtml', + 'label':'Save HTML As...', + 'command':'saveHtml', + }, + {'type':'MenuItem', 'name':'fileSep1', 'label':'-', Index: restEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/codeEditor/restEditor.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** restEditor.py 25 Aug 2004 18:08:18 -0000 1.6 --- restEditor.py 27 Aug 2004 02:03:25 -0000 1.7 *************** *** 7,11 **** import os ! from PythonCard import model from codeEditor import CodeEditor from wx import stc --- 7,11 ---- import os ! from PythonCard import dialog, model from codeEditor import CodeEditor from wx import stc *************** *** 25,28 **** --- 25,29 ---- #self.previewWindow.position = (425, -1) self.previewWindow.visible = True + self.html = '' # reST *************** *** 36,40 **** html = txt else: ! html = '<html><head></head><body>' + txt + '</body></html>' else: # KEA 2004-08-15 --- 37,41 ---- html = txt else: ! html = '<html>\n<head>\n</head>\n<body>\n' + txt + '\n</body>\n</html>\n' else: # KEA 2004-08-15 *************** *** 44,48 **** rest = restify(txt) if rest: ! html = '<html><head></head><body>' + rest + '</body></html>' else: html = self.previewWindow.components.html.text --- 45,49 ---- rest = restify(txt) if rest: ! html = '<html>\n<head>\n</head>\n<body>\n' + rest + '\n</body>\n</html>\n' else: html = self.previewWindow.components.html.text *************** *** 63,66 **** --- 64,91 ---- event.skip() + def saveHtmlFile(self, path): + try: + f = open(path, 'wb') + try: + f.write(self.html) + finally: + f.close() + except: + pass + + def on_saveHtml_command(self, event): + wildcard = "HTML files (*.html)|*.html|All files (*.*)|*.*" + #wildcard = self.resource.strings.saveAsWildcard + if self.documentPath is None: + dir = '' + filename = '*.html' + else: + dir = os.path.dirname(self.documentPath) + filename = os.path.splitext(os.path.basename(self.documentPath))[0] + '.html' + result = dialog.saveFileDialog(None, self.resource.strings.saveAs, dir, filename, wildcard) + if result.accepted: + path = result.paths[0] + self.saveHtmlFile(path) + def on_menuFormatRenderOnReturn_select(self, event): self.renderOnReturn = self.menuBar.getChecked('menuFormatRenderOnReturn') |
From: Kevin A. <ka...@us...> - 2004-08-26 23:25:15
|
Update of /cvsroot/pythoncard/PythonCard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23785/components Modified Files: list.py Log Message: removed getSelections since we don't support multi-select lists changed _isSelected back to isSelected Index: list.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/components/list.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** list.py 21 Jul 2004 20:09:04 -0000 1.26 --- list.py 26 Aug 2004 23:25:06 -0000 1.27 *************** *** 93,112 **** return items - # KEA fixed setValue - # there should be more flexibility than clearing the whole list - # and replacing it with a new one def _setItems( self, aList ) : - #self._delegate.setValue( aList ) - #self.Clear() - #self.InsertItems( aList, 0 ) - # KEA 2003-07-26 - # I'm just now realizing I could have been using Set self.Set(aList) - def getSelections( self ) : - return self.GetSelections() - - # KEA more wxListBox methods - def append(self, aString): self.Append(aString) --- 93,99 ---- *************** *** 134,138 **** # KEA was getSelected ! def _isSelected( self, aPosition ) : """Determines whether an item is selected. aPosition is the zero-based item index --- 121,125 ---- # KEA was getSelected ! def isSelected( self, aPosition ) : """Determines whether an item is selected. aPosition is the zero-based item index |
From: Kevin A. <ka...@us...> - 2004-08-26 18:37:02
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv662 Modified Files: model.py Log Message: fixed CustomDialog standalone bug Index: model.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/model.py,v retrieving revision 1.180 retrieving revision 1.181 diff -C2 -d -r1.180 -r1.181 *** model.py 12 Aug 2004 19:11:13 -0000 1.180 --- model.py 26 Aug 2004 18:36:52 -0000 1.181 *************** *** 1162,1166 **** # figure out the .rsrc.py filename based on the module name stored in library.zip filename = os.path.split(sys.modules[self.__class__.__module__].__file__)[1] ! filename = os.path.join(parent.application.applicationDirectory, filename) else: # figure out the .rsrc.py filename based on the module name --- 1162,1166 ---- # figure out the .rsrc.py filename based on the module name stored in library.zip filename = os.path.split(sys.modules[self.__class__.__module__].__file__)[1] ! filename = os.path.join(self.parent.application.applicationDirectory, filename) else: # figure out the .rsrc.py filename based on the module name |
From: Kevin A. <ka...@us...> - 2004-08-26 18:37:02
|
Update of /cvsroot/pythoncard/PythonCard/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv662/docs Modified Files: migration_guide.txt Log Message: fixed CustomDialog standalone bug Index: migration_guide.txt =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/docs/migration_guide.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** migration_guide.txt 25 Aug 2004 18:08:18 -0000 1.5 --- migration_guide.txt 26 Aug 2004 18:36:52 -0000 1.6 *************** *** 25,34 **** --------------------- 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. ! { 'stack':{ 'type':'Stack', to ! { 'application':{ 'type':'Application', In addition, in your source, self.stack.app references are now just self.application. --- 25,37 ---- --------------------- 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. + :: ! { 'stack':{ 'type':'Stack', to ! :: ! ! { 'application':{ 'type':'Application', In addition, in your source, self.stack.app references are now just self.application. *************** *** 39,45 **** 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. ! if __name__ == '__main__': ! app = model.Application(Minimal) ! app.MainLoop() --- 42,50 ---- 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. ! :: ! ! if __name__ == '__main__': ! app = model.Application(Minimal) ! app.MainLoop() *************** *** 72,81 **** ---------------- All imports from the wxPython.wx package have been changed to use the new wx package. For example: ! from wxPython import wx has been changed to ! import wx The biggest impact is that the wx prefix is no longer used (e.g. wx.wxFrame is now wx.Frame) in the framework or samples except for wxPython constants. --- 77,89 ---- ---------------- All imports from the wxPython.wx package have been changed to use the new wx package. For example: + :: ! from wxPython import wx has been changed to ! :: ! ! import wx The biggest impact is that the wx prefix is no longer used (e.g. wx.wxFrame is now wx.Frame) in the framework or samples except for wxPython constants. *************** *** 109,114 **** The order of the message and title args for any dialogs that take both has been reversed from previous versions of PythonCard. The message arg comes before title now. For example, ! dialog.singleChoiceDialog(self, "message", "title", ['one', 'two', 'three']) Any optional style args now use wx constants rather the old dialog module aliases. For example, you'll need to use wx.TE_PASSWORD or wx.TE_MULTILINE for the textEntryDialog if you want one of those styles. --- 117,123 ---- The order of the message and title args for any dialogs that take both has been reversed from previous versions of PythonCard. The message arg comes before title now. For example, + :: ! dialog.singleChoiceDialog(self, "message", "title", ['one', 'two', 'three']) Any optional style args now use wx constants rather the old dialog module aliases. For example, you'll need to use wx.TE_PASSWORD or wx.TE_MULTILINE for the textEntryDialog if you want one of those styles. |
From: Kevin A. <ka...@us...> - 2004-08-25 20:45:51
|
Update of /cvsroot/pythoncard/PythonCard/samples/ataxx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26478/samples/ataxx Modified Files: ataxx.py Log Message: fixed exceptions by commenting out references to computer move code Index: ataxx.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/ataxx/ataxx.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ataxx.py 12 Aug 2004 19:18:49 -0000 1.2 --- ataxx.py 25 Aug 2004 20:45:41 -0000 1.3 *************** *** 135,152 **** self.computer = COMPUTER self.lastHover = None ! if self.computer == HUMAN: ! self.boardModel.doComputerMove(HUMAN) ! ! def computerMove(self): ! if self.menuBar.getChecked('menuStrategyFlipMostPieces'): ! self.boardModel.doFlipMostPiecesComputerMove(self.computer) ! else: ! self.boardModel.doRandomComputerMove(self.computer) ! # sleep for a second to make it appear ! # the computer thought long and hard on her choice :) ! time.sleep(1) ! self.drawBoard() ! self.updateStatus() def newGame(self): --- 135,157 ---- self.computer = COMPUTER self.lastHover = None ! self.startLocation = None ! ## # this is leftover from the reversi sample ! ## # and has to be updated once there is an ataxx computer strategy ! ## # rather than just human vs. human ! ## if self.computer == HUMAN: ! ## self.boardModel.doComputerMove(HUMAN) ! ## ! ## ! ## def computerMove(self): ! ## if self.menuBar.getChecked('menuStrategyFlipMostPieces'): ! ## self.boardModel.doFlipMostPiecesComputerMove(self.computer) ! ## else: ! ## self.boardModel.doRandomComputerMove(self.computer) ! ## # sleep for a second to make it appear ! ## # the computer thought long and hard on her choice :) ! ## time.sleep(1) ! ## self.drawBoard() ! ## self.updateStatus() def newGame(self): *************** *** 154,159 **** self.drawBoard() self.updateStatus() ! if self.computer == BLACK: ! self.computerMove() def drawCell(self, x, y, state): --- 159,164 ---- self.drawBoard() self.updateStatus() ! ## if self.computer == COMPUTER: ! ## self.computerMove() def drawCell(self, x, y, state): |
From: Kevin A. <ka...@us...> - 2004-08-25 18:49:01
|
Update of /cvsroot/pythoncard/PythonCard/docs/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2820 Modified Files: documentation.html Log Message: added migration guide link Index: documentation.html =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/docs/html/documentation.html,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** documentation.html 14 Aug 2004 21:51:40 -0000 1.22 --- documentation.html 25 Aug 2004 18:48:51 -0000 1.23 *************** *** 48,51 **** --- 48,53 ---- <li><a href="framework/runtime_tools.html">Runtime Tools</a></li> </ul> + <h2><a name="migration_guide"></a>Migration Guide</h2> + If you are upgrading from PythonCardPrototype 0.7.3.1 or earlier to 0.8, then you should check out the <a href="migration_guide.html">Migration Guide</a> and modify your code and resoources accordingly. <h2><a name="other_articles">Other Articles</a></h2> <p><a href="http://www.onlamp.com/pub/a/python/2002/07/18/pycrust.html">Building GUI Applications With PythonCard And PyCrust</a> by Patrick O'Brien</p> |
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. |
From: Kevin A. <ka...@us...> - 2004-08-25 18:08:40
|
Update of /cvsroot/pythoncard/PythonCard/tools/codeEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25582/tools/codeEditor Modified Files: restEditor.py Log Message: started adding reStructuredText markup, added self.html to keep rendered Index: restEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/codeEditor/restEditor.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** restEditor.py 17 Aug 2004 21:52:38 -0000 1.5 --- restEditor.py 25 Aug 2004 18:08:18 -0000 1.6 *************** *** 52,55 **** --- 52,56 ---- curdir = os.getcwd() self.previewWindow.components.html.text = html + self.html = html os.chdir(curdir) |
From: Kevin A. <ka...@us...> - 2004-08-25 17:49:27
|
Update of /cvsroot/pythoncard/PythonCard/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22224/docs Modified Files: migration_guide.txt Log Message: added Alex's comments about functions that need to be changed to attributes Index: migration_guide.txt =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/docs/migration_guide.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** migration_guide.txt 15 Aug 2004 18:06:49 -0000 1.3 --- migration_guide.txt 25 Aug 2004 17:49:16 -0000 1.4 *************** *** 52,55 **** --- 52,56 ---- 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. + The correct way to get the result of a selection now is to use either the attribute 'selection' to retrieve the integer index, or 'stringSelection' for the text value; if you previously used functions such as getSelection() or getSelectionIndex() or getStringSelection() these need to be changed to use the attributes directly. mixedCase Method Names |
From: Kevin A. <ka...@us...> - 2004-08-24 20:16:58
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6612 Modified Files: util.py Log Message: convert backslashes to forward slashes Index: util.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/util.py,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** util.py 24 Aug 2004 19:01:16 -0000 1.31 --- util.py 24 Aug 2004 20:16:46 -0000 1.32 *************** *** 387,390 **** --- 387,396 ---- p = p + l2 path = os.path.join(*p) + # KEA 2004-08-24 + # this isn't really the right place to get rid of Windows-specific + # path stuff, but I don't want to have to stick this code everywhere + # I call relativePath, so let's see if this causes a problem + # we want all paths to be Unix-like with forward slashes + path = path.replace('\\\\', '/').replace('\\', '/') if path.startswith('../'): path = path[3:] |
From: Kevin A. <ka...@us...> - 2004-08-24 19:01:58
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12833 Modified Files: util.py Log Message: added relativePath function, used by resourceEditor added File... button to Property Editor Index: util.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/util.py,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** util.py 22 Aug 2004 18:44:53 -0000 1.30 --- util.py 24 Aug 2004 19:01:16 -0000 1.31 *************** *** 362,363 **** --- 362,391 ---- color = s return color + + # compute relative path + # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/208993 + + def pathsplit(p, rest=[]): + (h,t) = os.path.split(p) + if len(h) < 1: return [t]+rest + if len(t) < 1: return [h]+rest + return pathsplit(h,[t]+rest) + + def commonpath(l1, l2, common=[]): + if len(l1) < 1: return (common, l1, l2) + if len(l2) < 1: return (common, l1, l2) + if l1[0] != l2[0]: return (common, l1, l2) + return commonpath(l1[1:], l2[1:], common+[l1[0]]) + + # KEA 2004-08-24 + # I made a few changes below to get rid of redundant leading .. + def relativePath(p1, p2): + (common,l1,l2) = commonpath(pathsplit(p1), pathsplit(p2)) + p = [] + if len(l1) > 0: + p = ['../' * len(l1)] + p = p + l2 + path = os.path.join(*p) + if path.startswith('../'): + path = path[3:] + return path |
From: Kevin A. <ka...@us...> - 2004-08-24 19:01:52
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12833/tools/resourceEditor/modules Modified Files: backgroundInfoDialog.py propertyEditor.py propertyEditor.rsrc.py Log Message: added relativePath function, used by resourceEditor added File... button to Property Editor Index: backgroundInfoDialog.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/backgroundInfoDialog.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** backgroundInfoDialog.py 24 Aug 2004 07:17:40 -0000 1.15 --- backgroundInfoDialog.py 24 Aug 2004 19:01:37 -0000 1.16 *************** *** 49,53 **** if result.accepted: path = result.paths[0] ! filename = os.path.split(path)[-1] self.components.fldImage.text = filename --- 49,53 ---- if result.accepted: path = result.paths[0] ! filename = util.relativePath(self.parent.filename, path) self.components.fldImage.text = filename *************** *** 57,61 **** if result.accepted: path = result.paths[0] ! filename = os.path.split(path)[-1] self.components.fldIcon.text = filename --- 57,61 ---- if result.accepted: path = result.paths[0] ! filename = util.relativePath(self.parent.filename, path) self.components.fldIcon.text = filename Index: propertyEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/propertyEditor.py,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** propertyEditor.py 24 Aug 2004 07:17:40 -0000 1.51 --- propertyEditor.py 24 Aug 2004 19:01:37 -0000 1.52 *************** *** 31,35 **** self.editItems = [self.components.wField, self.components.wColor, self.components.wFont, self.components.wTextArea, ! self.components.wChecked, self.components.wPop] # KEA 2001-08-14 --- 31,36 ---- self.editItems = [self.components.wField, self.components.wColor, self.components.wFont, self.components.wTextArea, ! self.components.wChecked, self.components.wPop, ! self.components.wFile,] # KEA 2001-08-14 *************** *** 89,92 **** --- 90,101 ---- self.updateComponent() + def on_wFile_mouseClick(self, event): + path, filename = os.path.split(self.components.wField.text) + result = dialog.openFileDialog(self, directory=path, filename=filename) + if result.accepted: + self.components.wField.text = util.relativePath(self._parent.filename, result.paths[0]) + if self.autoAttributeUpdate: + self.updateComponent() + def addWidgetToComponentList(self, widget): *************** *** 389,392 **** --- 398,403 ---- elif propName == 'font': self.components.wFont.visible = True + elif propName == 'file': + self.components.wFile.visible = True self.components.wName.text = propName + ":" Index: propertyEditor.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/propertyEditor.rsrc.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** propertyEditor.rsrc.py 14 Aug 2004 07:46:20 -0000 1.11 --- propertyEditor.rsrc.py 24 Aug 2004 19:01:37 -0000 1.12 *************** *** 55,58 **** --- 55,65 ---- }, + {'type':'Button', + 'name':'wFile', + 'position':(320, 130), + 'label':'File...', + 'visible':0, + }, + {'type':'TextField', 'name':'wField', |
From: Kevin A. <ka...@us...> - 2004-08-24 19:01:50
|
Update of /cvsroot/pythoncard/PythonCard/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12833/docs Modified Files: changelog.txt Log Message: added relativePath function, used by resourceEditor added File... button to Property Editor Index: changelog.txt =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/docs/changelog.txt,v retrieving revision 1.303 retrieving revision 1.304 diff -C2 -d -r1.303 -r1.304 *** changelog.txt 22 Aug 2004 18:44:53 -0000 1.303 --- changelog.txt 24 Aug 2004 19:01:16 -0000 1.304 *************** *** 3,7 **** Release 0.8.1 2004-09-?? ! added colorFromString to util.py added main_is_frozen workaround for bundlebuilder standalones on Mac --- 3,8 ---- Release 0.8.1 2004-09-?? ! added relativePath to util.py ! added colorFromString to util.py added main_is_frozen workaround for bundlebuilder standalones on Mac |
From: Alex T. <ale...@us...> - 2004-08-24 14:19:52
|
Update of /cvsroot/pythoncard/PythonCard/tools/findfiles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18771/tools/findfiles Modified Files: findfiles.rsrc.py Log Message: Fixed spelling mistakes - typo Documenation changed to Documentation Index: findfiles.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/findfiles/findfiles.rsrc.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** findfiles.rsrc.py 10 May 2004 05:02:48 -0000 1.23 --- findfiles.rsrc.py 24 Aug 2004 14:19:32 -0000 1.24 *************** *** 42,46 **** {'type':'MenuItem', 'name':'menuFindFilesDocumentation', ! 'label':'&findfiles Documenation...\tF1', 'command':'showFindFilesDocumentation', }, --- 42,46 ---- {'type':'MenuItem', 'name':'menuFindFilesDocumentation', ! 'label':'&findfiles Documentation...\tF1', 'command':'showFindFilesDocumentation', }, |
From: Alex T. <ale...@us...> - 2004-08-24 14:19:52
|
Update of /cvsroot/pythoncard/PythonCard/tools/codeEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18771/tools/codeEditor Modified Files: codeEditor.rsrc.py codeEditorR.rsrc.py restEditor.rsrc.py Log Message: Fixed spelling mistakes - typo Documenation changed to Documentation Index: codeEditorR.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/codeEditor/codeEditorR.rsrc.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** codeEditorR.rsrc.py 10 May 2004 05:02:48 -0000 1.4 --- codeEditorR.rsrc.py 24 Aug 2004 14:19:31 -0000 1.5 *************** *** 288,292 **** {'type':'MenuItem', 'name':'menuShellDocumentation', ! 'label':'&Shell Documenation...', 'command':'showShellDocumentation', }, --- 288,292 ---- {'type':'MenuItem', 'name':'menuShellDocumentation', ! 'label':'&Shell Documentation...', 'command':'showShellDocumentation', }, Index: restEditor.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/codeEditor/restEditor.rsrc.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** restEditor.rsrc.py 17 Aug 2004 21:52:39 -0000 1.4 --- restEditor.rsrc.py 24 Aug 2004 14:19:31 -0000 1.5 *************** *** 326,330 **** {'type':'MenuItem', 'name':'menuShellDocumentation', ! 'label':'&Shell Documenation...', 'command':'showShellDocumentation', }, --- 326,330 ---- {'type':'MenuItem', 'name':'menuShellDocumentation', ! 'label':'&Shell Documentation...', 'command':'showShellDocumentation', }, Index: codeEditor.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/codeEditor/codeEditor.rsrc.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** codeEditor.rsrc.py 19 Jul 2004 18:21:45 -0000 1.33 --- codeEditor.rsrc.py 24 Aug 2004 14:19:31 -0000 1.34 *************** *** 296,300 **** {'type':'MenuItem', 'name':'menuShellDocumentation', ! 'label':'&Shell Documenation...', 'command':'showShellDocumentation', }, --- 296,300 ---- {'type':'MenuItem', 'name':'menuShellDocumentation', ! 'label':'&Shell Documentation...', 'command':'showShellDocumentation', }, |
From: Kevin A. <ka...@us...> - 2004-08-24 07:17:50
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22734/tools/resourceEditor/modules Modified Files: backgroundInfoDialog.py propertyEditor.py Log Message: pass in current color to colorDialog Index: backgroundInfoDialog.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/backgroundInfoDialog.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** backgroundInfoDialog.py 22 Aug 2004 18:44:54 -0000 1.14 --- backgroundInfoDialog.py 24 Aug 2004 07:17:40 -0000 1.15 *************** *** 36,45 **** def on_btnForegroundColor_mouseClick(self, event): ! result = dialog.colorDialog(self) if result.accepted: self.components.fldForegroundColor.text = str(result.color) def on_btnBackgroundColor_mouseClick(self, event): ! result = dialog.colorDialog(self) if result.accepted: self.components.fldBackgroundColor.text = str(result.color) --- 36,45 ---- def on_btnForegroundColor_mouseClick(self, event): ! result = dialog.colorDialog(self, color=util.colorFromString(self.components.fldForegroundColor.text)) if result.accepted: self.components.fldForegroundColor.text = str(result.color) def on_btnBackgroundColor_mouseClick(self, event): ! result = dialog.colorDialog(self, color=util.colorFromString(self.components.fldBackgroundColor.text)) if result.accepted: self.components.fldBackgroundColor.text = str(result.color) Index: propertyEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/propertyEditor.py,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** propertyEditor.py 23 Aug 2004 15:06:50 -0000 1.50 --- propertyEditor.py 24 Aug 2004 07:17:40 -0000 1.51 *************** *** 6,10 **** """ ! from PythonCard import dialog, font, model, registry from PythonCard.event import ChangeListener import resourceOutput --- 6,10 ---- """ ! from PythonCard import dialog, font, model, registry, util from PythonCard.event import ChangeListener import resourceOutput *************** *** 66,70 **** def on_wColor_mouseClick(self, event): ! result = dialog.colorDialog(self) if result.accepted: self.components.wField.text = str(result.color) --- 66,70 ---- def on_wColor_mouseClick(self, event): ! result = dialog.colorDialog(self, color=util.colorFromString(self.components.wField.text)) if result.accepted: self.components.wField.text = str(result.color) |
From: Kevin A. <ka...@us...> - 2004-08-24 06:51:59
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15741/tools/resourceEditor/modules Modified Files: newComponentDialog.rsrc.py Log Message: removed position, need to make this attr optional in resourceEditor Index: newComponentDialog.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/newComponentDialog.rsrc.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** newComponentDialog.rsrc.py 23 Aug 2004 23:36:08 -0000 1.4 --- newComponentDialog.rsrc.py 24 Aug 2004 06:51:49 -0000 1.5 *************** *** 2,6 **** 'name':'Template', 'title':'Dialog Template', - 'position':(66, 66), 'size':(300, 170), 'components': [ --- 2,5 ---- |
From: Kevin A. <ka...@us...> - 2004-08-24 06:48:51
|
Update of /cvsroot/pythoncard/PythonCard/samples/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14894/samples/widgets Modified Files: widgets.py Log Message: fixed Blit typo Index: widgets.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/widgets/widgets.py,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** widgets.py 15 Aug 2004 17:34:58 -0000 1.41 --- widgets.py 24 Aug 2004 06:48:40 -0000 1.42 *************** *** 372,376 **** memdc.SelectObject(bmp) dc = wx.WindowDC(w) ! memdc.Blit((0, 0), w.size, dc, (0, 0)) imgfilename = os.path.join(imagesDir, name + '.png') bmp.SaveFile(imgfilename, wx.BITMAP_TYPE_PNG) --- 372,376 ---- memdc.SelectObject(bmp) dc = wx.WindowDC(w) ! memdc.BlitPointSize((0, 0), w.size, dc, (0, 0)) imgfilename = os.path.join(imagesDir, name + '.png') bmp.SaveFile(imgfilename, wx.BITMAP_TYPE_PNG) |
From: Alex T. <ale...@us...> - 2004-08-23 23:36:20
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23667/tools/resourceEditor/modules Modified Files: newComponentDialog.rsrc.py Log Message: Typo "Offest" -> "Offset" Index: newComponentDialog.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/newComponentDialog.rsrc.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** newComponentDialog.rsrc.py 16 Aug 2004 16:39:34 -0000 1.3 --- newComponentDialog.rsrc.py 23 Aug 2004 23:36:08 -0000 1.4 *************** *** 2,5 **** --- 2,6 ---- 'name':'Template', 'title':'Dialog Template', + 'position':(66, 66), 'size':(300, 170), 'components': [ *************** *** 20,24 **** 'name':'chkHorizontal', 'position':(10, 80), ! 'label':'Offest Horizontally', }, --- 21,25 ---- 'name':'chkHorizontal', 'position':(10, 80), ! 'label':'Offset Horizontally', }, *************** *** 26,30 **** 'name':'chkVertical', 'position':(170, 80), ! 'label':'Offest Vertically', }, --- 27,31 ---- 'name':'chkVertical', 'position':(170, 80), ! 'label':'Offset Vertically', }, *************** *** 34,38 **** 'position':(30, 110), 'label':'OK', - 'default':1, }, --- 35,38 ---- *************** *** 47,51 **** 'name':'lblLabelOrText', 'position':(5, 40), ! 'size':(50, -1), 'alignment':'right', 'text':'Label:', --- 47,51 ---- 'name':'lblLabelOrText', 'position':(5, 40), ! 'size':(50, -1), 'alignment':'right', 'text':'Label:', *************** *** 55,59 **** 'name':'lblName', 'position':(5, 10), ! 'size':(50, -1), 'alignment':'right', 'text':'Name:', --- 55,59 ---- 'name':'lblName', 'position':(5, 10), ! 'size':(50, -1), 'alignment':'right', 'text':'Name:', |
From: Kevin A. <ka...@us...> - 2004-08-23 15:07:00
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20760/tools/resourceEditor/modules Modified Files: propertyEditor.py Log Message: added autoAttributeUpdate flag and event handlers for testing updating Index: propertyEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/propertyEditor.py,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** propertyEditor.py 12 Aug 2004 19:14:23 -0000 1.49 --- propertyEditor.py 23 Aug 2004 15:06:50 -0000 1.50 *************** *** 25,28 **** --- 25,29 ---- self._comp = self._parent.components self._updatingComponent = 0 + self.autoAttributeUpdate = True ##self.components.addChangeEventListener(self) self._comp.addChangeEventListener(self) *************** *** 45,48 **** --- 46,92 ---- self.visible = True + # KEA 2004-08-23 + # support updating of attributes without the need + # for clicking the Update button + def on_wField_closeField(self, event): + if self.autoAttributeUpdate: + self.updateComponent() + + def on_wTextArea_closeField(self, event): + if self.autoAttributeUpdate: + self.updateComponent() + + def on_wChecked_mouseClick(self, event): + if self.autoAttributeUpdate: + self.updateComponent() + + def on_wPop_select(self, event): + if self.autoAttributeUpdate: + self.updateComponent() + + def on_wColor_mouseClick(self, event): + result = dialog.colorDialog(self) + if result.accepted: + self.components.wField.text = str(result.color) + if self.autoAttributeUpdate: + self.updateComponent() + + def on_wFont_mouseClick(self, event): + wName, wClass = self.components.wComponentList.stringSelection.split(" : ") + ##widget = self.components[wName] + widget = self._comp[wName] + f = widget.font + if f is None: + desc = font.fontDescription(widget.GetFont()) + f = font.Font(desc) + result = dialog.fontDialog(self, f) + if result.accepted: + #color = dlg.getColor() + f = result.font + #self.components.wField.SetValue("%s;%s" % (f, color)) + self.components.wField.text = "%s" % f + if self.autoAttributeUpdate: + self.updateComponent() + def addWidgetToComponentList(self, widget): *************** *** 125,128 **** --- 169,175 ---- def on_wUpdate_mouseClick(self, event): + self.updateComponent() + + def updateComponent(self): # make these attributes of self, since they are duplicated below in displayProperty checkItems = ['enabled', 'visible', 'editable', 'checked', 'default', 'rules', 'labels', 'ticks'] *************** *** 268,291 **** self._parent.showSizingHandles(wName) - def on_wColor_mouseClick(self, event): - result = dialog.colorDialog(self) - if result.accepted: - self.components.wField.text = str(result.color) - - def on_wFont_mouseClick(self, event): - wName, wClass = self.components.wComponentList.stringSelection.split(" : ") - ##widget = self.components[wName] - widget = self._comp[wName] - f = widget.font - if f is None: - desc = font.fontDescription(widget.GetFont()) - f = font.Font(desc) - result = dialog.fontDialog(self, f) - if result.accepted: - #color = dlg.getColor() - f = result.font - #self.components.wField.SetValue("%s;%s" % (f, color)) - self.components.wField.text = "%s" % f - def setValidProps(self, wClass): #print "setValidProps", wClass --- 315,318 ---- |
From: Kevin A. <ka...@us...> - 2004-08-22 20:56:46
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29218/tools/resourceEditor/modules Modified Files: stringDialog.py Log Message: refactored selection code so exception wouldn't be thrown Index: stringDialog.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/stringDialog.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** stringDialog.py 22 Aug 2004 19:11:35 -0000 1.11 --- stringDialog.py 22 Aug 2004 20:56:34 -0000 1.12 *************** *** 30,33 **** --- 30,44 ---- self.parent = aBg + """ + # KEA 2004-08-22 + # workaround/hack to make sure closeField message + # is processed prior to the dialog being closed + # this occurs when one of the fields are edited and then + # the user clicks Ok + # this hack works because we don't process on_close + # the first time, but rather delay it by posting a second close message + self.closeDialog = False + """ + # if some special setup is necessary, do it here self.stringList = stringList *************** *** 35,39 **** sortedStrings.sort() for s in sortedStrings: ! label = s + SPACER + self.stringList[s].split('\n')[0] self.components.listStrings.append(label) --- 46,50 ---- sortedStrings.sort() for s in sortedStrings: ! label = self.getLabelFromKey(s) self.components.listStrings.append(label) *************** *** 44,49 **** return stringList def updateItemLabel(self, n, key): ! label = key + SPACER + self.stringList[key].split('\n')[0] self.components.listStrings.setString(n, label) --- 55,63 ---- return stringList + def getLabelFromKey(self, key): + return key + SPACER + self.stringList[key].split('\n')[0] + def updateItemLabel(self, n, key): ! label = self.getLabelFromKey(key) self.components.listStrings.setString(n, label) *************** *** 97,101 **** s = NEWSTRING if s in self.stringList: ! self.components.listStrings.stringSelection = s else: self.stringList[s] = '' --- 111,115 ---- s = NEWSTRING if s in self.stringList: ! self.components.listStrings.stringSelection = self.getLabelFromKey(s) else: self.stringList[s] = '' *************** *** 106,109 **** --- 120,142 ---- self.displayItemAttributes(self.getStringSelectionKey()) + """ + # KEA 2004-08-22 + # experiment to workaround Mac closeField bug + # ignore for now along with the extra debug print statements in closeField + # event handlers above + def on_mouseClick(self, event): + try: + print self.closeDialog + print event.target.name + print event.target.id + except: + pass + if self.closeDialog: + event.skip() + else: + self.closeDialog = True + wx.PostEvent(self, event) + """ + def stringDialog(parent, rsrc): |
From: Kevin A. <ka...@us...> - 2004-08-22 19:11:45
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29030/tools/resourceEditor/modules Modified Files: dialogInfoDialog.py menuDialog.py stringDialog.py Log Message: added function wrappers for dialogInfoDialog, menuDialog, and stringDialog Index: dialogInfoDialog.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/dialogInfoDialog.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dialogInfoDialog.py 15 Apr 2004 23:59:30 -0000 1.6 --- dialogInfoDialog.py 22 Aug 2004 19:11:35 -0000 1.7 *************** *** 20,21 **** --- 20,31 ---- self.components.fldSize.text = str(rsrc.size) + def dialogInfoDialog(parent, rsrc): + dlg = DialogInfoDialog(parent, rsrc) + result = dlg.showModal() + if result.accepted: + result.name = dlg.components.fldName.text + result.title = dlg.components.fldTitle.text + result.position = eval(dlg.components.fldPosition.text) + result.size = eval(dlg.components.fldSize.text) + dlg.destroy() + return result Index: menuDialog.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/menuDialog.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** menuDialog.py 10 Aug 2004 23:41:00 -0000 1.15 --- menuDialog.py 22 Aug 2004 19:11:35 -0000 1.16 *************** *** 374,375 **** --- 374,387 ---- self.rebuildListMenus(sel) self.displayItemAttributes(sel) + + + def menuDialog(parent, rsrc): + dlg = MenuDialog(parent, rsrc) + result = dlg.showModal() + if result.accepted: + if len(dlg.menuList) == 0: + result.menubar = None + else: + result.menubar = menuResourceFromList(dlg.menuList) + dlg.destroy() + return result Index: stringDialog.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/stringDialog.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** stringDialog.py 24 Apr 2004 06:49:47 -0000 1.10 --- stringDialog.py 22 Aug 2004 19:11:35 -0000 1.11 *************** *** 52,55 **** --- 52,56 ---- def on_fldName_closeField(self, event): + print "closeField fldName", event.target.text newName = event.target.text previousName = self.getStringSelectionKey() *************** *** 68,71 **** --- 69,73 ---- def on_fldValue_closeField(self, event): + print "closeField fldValue", event.target.text sel = self.components.listStrings.selection name = self.getStringSelectionKey() *************** *** 104,105 **** --- 106,116 ---- self.displayItemAttributes(self.getStringSelectionKey()) + + def stringDialog(parent, rsrc): + dlg = StringDialog(parent, rsrc) + result = dlg.showModal() + if result.accepted: + result.stringList = stringResourceFromList(dlg.stringList) + dlg.destroy() + return result + |
From: Kevin A. <ka...@us...> - 2004-08-22 19:11:44
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29030/tools/resourceEditor Modified Files: resourceEditor.py Log Message: added function wrappers for dialogInfoDialog, menuDialog, and stringDialog Index: resourceEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/resourceEditor.py,v retrieving revision 1.209 retrieving revision 1.210 diff -C2 -d -r1.209 -r1.210 *** resourceEditor.py 22 Aug 2004 18:44:53 -0000 1.209 --- resourceEditor.py 22 Aug 2004 19:11:34 -0000 1.210 *************** *** 21,27 **** from modules import stackInfoDialog from modules import menuDialog ! from modules.newComponentDialog import newComponentDialog from modules import stringDialog ! from modules.dialogInfoDialog import DialogInfoDialog from modules.propertyEditor import PropertyEditor from modules import resourceOutput --- 21,27 ---- from modules import stackInfoDialog from modules import menuDialog ! from modules import newComponentDialog from modules import stringDialog ! from modules import dialogInfoDialog from modules.propertyEditor import PropertyEditor from modules import resourceOutput *************** *** 1033,1037 **** optionalAttributes = registry.Registry.getInstance().components[desc['type']]._spec._optionalAttributes.keys() ! result = newComponentDialog(self, desc, optionalAttributes, offsets, promptString) if result.accepted: name = result.name --- 1033,1037 ---- optionalAttributes = registry.Registry.getInstance().components[desc['type']]._spec._optionalAttributes.keys() ! result = newComponentDialog.newComponentDialog(self, desc, optionalAttributes, offsets, promptString) if result.accepted: name = result.name *************** *** 1310,1323 **** background.position = self.GetPositionTuple() background.size = self.GetSizeTuple() ! dlg = DialogInfoDialog(self, background) ! result = dlg.showModal() if result.accepted: ! background.name = dlg.components.fldName.text ! background.title = dlg.components.fldTitle.text ! background.position = eval(dlg.components.fldPosition.text) ! background.size = eval(dlg.components.fldSize.text) self.updatePanel(self.rsrc) self.documentChanged = True - dlg.destroy() --- 1310,1321 ---- background.position = self.GetPositionTuple() background.size = self.GetSizeTuple() ! result = dialogInfoDialog.dialogInfoDialog(self, background) if result.accepted: ! background.name = result.name ! background.title = result.title ! background.position = result.position ! background.size = result.size self.updatePanel(self.rsrc) self.documentChanged = True *************** *** 1327,1339 **** except: menubar = None ! dlg = menuDialog.MenuDialog(self, menubar) ! result = dlg.showModal() if result.accepted: ! if len(dlg.menuList) == 0: ! self.rsrc.application.backgrounds[0].menubar = None ! else: ! self.rsrc.application.backgrounds[0].menubar = menuDialog.menuResourceFromList(dlg.menuList) self.documentChanged = True - dlg.destroy() def on_editStrings_command(self, event): --- 1325,1332 ---- except: menubar = None ! result = menuDialog.menuDialog(self, menubar) if result.accepted: ! self.rsrc.application.backgrounds[0].menubar = result.menubar self.documentChanged = True def on_editStrings_command(self, event): *************** *** 1348,1360 **** except: stringList = {} ! dlg = stringDialog.StringDialog(self, stringList) ! result = dlg.showModal() if result.accepted: if self.editingDialog: ! self.rsrc.strings = stringDialog.stringResourceFromList(dlg.stringList) else: ! self.rsrc.application.backgrounds[0].strings = stringDialog.stringResourceFromList(dlg.stringList) self.documentChanged = True - dlg.destroy() --- 1341,1351 ---- except: stringList = {} ! result = stringDialog.stringDialog(self, stringList) if result.accepted: if self.editingDialog: ! self.rsrc.strings = result.stringList else: ! self.rsrc.application.backgrounds[0].strings = result.stringList self.documentChanged = True |