dabo Commit Revision 2473 Date: 2006-11-17 15:27:34 -0800 (Fri, 17 Nov 2006) Author: paul
Changed: _U branches/wx2.7/ANNOUNCE _U branches/wx2.7/AUTHORS UU branches/wx2.7/ChangeLog _U branches/wx2.7/INSTALL _U branches/wx2.7/README _U branches/wx2.7/TODO U branches/wx2.7/dabo/__version__.py _U branches/wx2.7/dabo/biz/dAutoBizobj.py U branches/wx2.7/dabo/biz/dBizobj.py _U branches/wx2.7/dabo/biz/newRecordProblem.py U branches/wx2.7/dabo/dApp.py U branches/wx2.7/dabo/dEvents.py U branches/wx2.7/dabo/dPref.py U branches/wx2.7/dabo/db/dBackend.py U branches/wx2.7/dabo/db/dConnectInfo.py U branches/wx2.7/dabo/db/dCursorMixin.py UU branches/wx2.7/dabo/db/dNoEscQuoteStr.py A branches/wx2.7/dabo/db/dbMsSQL.py U branches/wx2.7/dabo/lib/DesignerXmlConverter.py _U branches/wx2.7/dabo/lib/datanav/Bizobj.py U branches/wx2.7/dabo/lib/datanav/Form.py U branches/wx2.7/dabo/lib/datanav/Page.py U branches/wx2.7/dabo/lib/datanav/PageFrame.py _U branches/wx2.7/dabo/lib/datanav/__init__.py U branches/wx2.7/dabo/lib/reportWriter.py A branches/wx2.7/dabo/lib/untabify.py _U branches/wx2.7/dabo/ui/dialogs/__init__.py A branches/wx2.7/dabo/ui/dialogs/htmlAbout.py U branches/wx2.7/dabo/ui/uiwx/__init__.py UU branches/wx2.7/dabo/ui/uiwx/concordance.py U branches/wx2.7/dabo/ui/uiwx/dButton.py U branches/wx2.7/dabo/ui/uiwx/dEditBox.py U branches/wx2.7/dabo/ui/uiwx/dEditor.py U branches/wx2.7/dabo/ui/uiwx/dForm.py U branches/wx2.7/dabo/ui/uiwx/dFormMixin.py U branches/wx2.7/dabo/ui/uiwx/dGrid.py A branches/wx2.7/dabo/ui/uiwx/dHtmlBox.py U branches/wx2.7/dabo/ui/uiwx/dListControl.py U branches/wx2.7/dabo/ui/uiwx/dPemMixin.py U branches/wx2.7/dabo/ui/uiwx/dRadioGroup.py U branches/wx2.7/dabo/ui/uiwx/dRadioList.py U branches/wx2.7/dabo/ui/uiwx/dSpinner.py U branches/wx2.7/dabo/ui/uiwx/dSplitter.py U branches/wx2.7/dabo/ui/uiwx/dTimer.py U branches/wx2.7/dabo/ui/uiwx/dToggleButton.py U branches/wx2.7/dabo/ui/uiwx/dTreeView.py U branches/wx2.7/dabo/ui/uiwx/uiApp.py _U branches/wx2.7/ez_setup.py _U branches/wx2.7/setup.py _U branches/wx2.7/tools/reportMixedIndentation.py Log: Updated the test wx2.7 branch with all the changes to Dabo that occurred since the branch was created, except the commit that reverted the wx2.7 stuff. Diff: Property changes on: branches/wx2.7/ANNOUNCE ___________________________________________________________________ Name: svn:eol-style + native Property changes on: branches/wx2.7/AUTHORS ___________________________________________________________________ Name: svn:eol-style + native Modified: branches/wx2.7/ChangeLog =================================================================== --- branches/wx2.7/ChangeLog 2006-11-17 20:24:13 UTC (rev 2472) +++ branches/wx2.7/ChangeLog 2006-11-17 23:27:34 UTC (rev 2473) @@ -1,821 +1,996 @@ See the Subversion log for all the details. -Dabo 0.6 (2006-03-27) (Revision 2043): -(for now, due to lack of time, I'm just echoing svn log. If someone wants to -summarize the changes --today!-- that would be *very much* appreciated.) ------------------------------------------------------------------------- -r1863 | ed | 2006-01-25 18:41:44 -0800 (Wed, 25 Jan 2006) | 4 lines +=============================================================================== +Dabo 0.7 (2006-11-16) (Revision 2464): -Fixed a problem when switching to the Browse page of the datanav grid without first running a query. Also, there was an error being thrown if a previous query had results, and a subsequent query had no results. +It has sure been a while, but we haven't been resting. Lots of new stuff +as we move one step forward to Dabo 1.0. Here are the most important +things to mention. -Modified the code in _setCurrentRow() of dGrid so that it wasn't calling SetGridCursor() unless the position had actually changed. I had recorded up to 10 calls to this function, all with the exact same values each time I switched to the Browse page. +Notable things: ++ SQLite is now required. ++ wxPython 2.7 and 2.8 DO NOT WORK yet, but will soon, so stick with 2.6 + for now. ++ Dabo preferences are no longer saved in .ini files, but as sqlite databases. ++ The old shortcut of referencing fields in bizobjs like: + fname = biz.first_name + no longer works. You need to change all such code to read: + fname = biz.Record.first_name ------------------------------------------------------------------------- -r1864 | ed | 2006-01-26 09:34:20 -0800 (Thu, 26 Jan 2006) | 4 lines +Known Issues: ++ FireBird Requery problem (see http://dabodev.com/tracker/0229) -Removed the code that lower-cased field names, as it was preventing the code from working with case-sensitive backends and columns containing capital letters. -Also fixed a problem where str values were not able to be properly converted to unicode. +Bug Fixes: ++ Replace function in dTextBox and dEditBox causing traceback. Fixed. ++ Incremental search in dGrid now works with unicode data. ++ Double select page on Mac and Win. Fixed. ++ Datanav select page scrollbar doesn't show. Fixed. ++ Ignore Tab and Shift+Tab in grid searching, so they can navigate. ++ Setting AutoPopulatePK on the bizobj doesn't propagate to cursor. Fixed. ++ Entering a unicode character in a dTextBox set up with a str value doesn't + stick. Fixed. ++ Fixed unicode problems in dEditor. ++ Fixed problem where fast cpu's could generate non-unique object names. ++ Fixed showModal() to reactivate previously deactivated windows accordingly. ++ dCursor's initProperties() called twice. Fixed. ++ Spacers not working correctly in class designer generated files. Fixed. ++ Fixed dabo.ui.getMouseObject() to always return the dabo object, not the + wx one. This would happen with grids, for example. ++ Border sizer caption not showing. Fixed. ++ Connection information not properly escaped in default.cnxml. Fixed. ++ Fixed layout of nested sizers. ++ Fixed running class-within-a-class (class designer generated). ++ Fixed paged controls to work when generated from the Class Designer. ++ Grid mouse events duplicated. Fixed. ++ Can't set RegID from within initProperties(). Fixed. ++ stderr and stdout not restored if intellisense processing caused exception. + Fixed. ++ Fixed login form to look okay at low resolutions. ++ Removed old, lingering requirement for mx.DateTime. ++ dSpinner doesn't work correctly unless initialized to '0'. Fixed. ++ dForm.ActiveControl would return controls in other forms, if they were the + current active control with keyboard focus, when clearly we want the active + control of *this* form. Fixed. ++ Fixed function in dbSQLite to find and set the pk field. ++ Fixed __version__.py to work outside the expected directory naming + structure. ++ Report writer wasn't initializing report variables before starting the + iteration of the cursor, resulting in errors if you referred to the + variables from inside the page header, for example. Fixed. ++ Setting the Value of a data-bound control programatically wasn't propagating + to the underlying bizobj. Fixed. ++ New reportlab can only handle utf-8, causing errors otherwise. Added a + friendly message in case this happens to you when running the Quick Report + option in AppWizard-generated apps. ------------------------------------------------------------------------- -r1866 | ed | 2006-01-26 15:11:35 -0800 (Thu, 26 Jan 2006) | 2 lines +Enhancements: ++ Added Visible property to grid dColumns. ++ Added column information to the EventData of grid events. ++ Removed RequeryOnLoad property from datanav.Form to dabo.ui.dForm. ++ Can now send kwargs to grid.addColumn(), which get sent to the column's + constructor. ++ Added self.super() to replace cls.doDefault, thanks to Timothy Delaney. ++ Added exception handling to requerying. If exception happens, the + transaction will be rolled back. ++ Enhanced the process used to determine field types. In addition to better + automatic deduction of types, you can now explicitly set the DataStructure + property of dBizobj and Dabo will respect that. ++ Added Alt+Up and Alt+Down to AppWizard Apps, which bring you to first and + last records, respectively. ++ Added properties for getting/setting the selection and insertion point for + text controls. These are InsertionPosition, SelectedText, SelectionEnd, + SelectionLength, and SelectionStart. ++ Compound primary keys can now be used. ++ Dabo icon now has an alpha channel and looks much better. Thanks to Kenneth + Ismert for doing a great job of this. ++ Added Expanded property for treeview nodes. ++ Can now set PageClass property of dPageFrame to a cdxml file. ++ Added dRadioList to replace dRadioGroup. Pure Dabo control. ++ Added ability to set a bizobj LinkField property to a table.field reference. ++ Added RequeryWithParent property to dBizobj, True by default. Allows for + user code to determine when to requery the child, for performance reasons. ++ Added Selection property to dGrid, which returns the list of selected rows + or columns. ++ Added AutoBizobj, thanks to Echo. ++ Added Count property to dMenu, to return the number of child menus. ++ Changed most initial dEditor settings into configurable properties. ++ Drag/Drop for tree nodes begun. ++ Added getCurrentRecord() that returns the actual record data. ++ Added dPref for managing application preferences, and switched the default + way to save/restore settings to use this class. Your application can define + whatever hierarchy you see fit. See also the new BasePrefKey and + PreferenceManager properties of dObject. ++ Added ForceCase property to dTextBox and dEditBox. Forces to upper, lower, + or title case as the user types. ++ Added getTempCursor() to facilitate ad-hoc data queries. ++ Added dApp.Encoding property, a single place to get the unicode encoding. To + set the default encoding, use dabo.defaultEncoding = "latin-1", for example. ++ Added clear() method to sizers, to remove all items from the sizer, and to + optionally destroy the items as well. ++ Added Precision property to dColumn, which specifies the number of places to + show for float columns. ++ Added preliminary support for BLOB fields. Works at least with MySQL. ++ Added GridBeforeSort and GridAfterSort events. ++ Added itemNode entry to the eventData for Tree events. ++ dToggleButton now uses GenBitmapTextToggleButton, allowing for text and + images. ++ Added some filtering functions to dDataSet, for selecting which records + to return. ++ Added transparency and drawGradient to drawing objects. Thanks to Andrea + Galvana for the gradient code. ++ Added WordWrap property to dColumn, which will wrap the text appropriately. ++ Added cut/copy/paste hooks at the grid level. ++ Added dabo.ui.getFormMousePosition (position relative to active form) ++ Added DrawMode property, the logical function to use for draw operations. ++ Added ability for About dialog subclasses to add their own version info. ++ Added helper functions to dabo.ui: isControlDown(), isShiftDown(), + isAltDown(), and isCommandDown() which will return True/False depending + on whether the key is down while the call is made. ++ Added containerCoordinates() and formCoordinates() method, to get the + current mouse position relative to the container or form. ++ Added objectCoordinates(), which is relative to the object. ++ Made dForm.ActiveForm settable as well as gettable. ++ Added isContainedBy() function, returning True if the object is contained + inside the passed container. ++ Made dEditor a data-aware control (cool!) ++ Added Encoding property to dDataSet. Thanks to Simen Haugen. ++ Can now send extra keyword args to bindKey(), which will get included in + the eventData dictionary, just like it works with bindEvent(). ++ Added Dabo data type code "L" for blobs, "G" for longs, and "F" for floats. ++ Added 'sort none' option to dGrid. Now, the third mouse click on the header + will be 'no sort'. ++ Added accelerator keys to the datanav Actions menu. Added Select All to the + Edit menu. ++ Added dabo/ui/uiwx/concordance.py, which shows a listing of all the Dabo + ui classes, and the wx Class from which they descend. Then, it shows the + wx classes, and the list of Dabo classes that descend from it. Should help + people with questions like "where is wx.TextCtrl in Dabo? (dTextBox). ++ Added MultipleSelection property to dGrid. ++ Improved dPageList, allowing setting the spacing of the list items with + ListSpacing, and catching right-clicks smartly (the correct item gets + referenced). ++ Added function dabo.lib.getRandomUUID(). Thanks to Ka-Ping Yee. ++ Added method afterInitAll(), which gets called after all child objects have + been initialized and are live. ++ Added helpful treeFromStructure() method to dTreeView, which takes a + hierarchy (in list or tuple form) and constructs the tree nodes accordingly. ++ Added ability to send sequences of 3-sequences to the ok/cancel dialog to + automatically construct labels and controls on the dialog. ++ Couldn't use the same RegID for objects, even if the prior object was + destroyed. Relaxed the requirements to allow for this. ++ Added dHtmlBox, which wraps wx.html.HtmlWindow, for displaying formatted + text simply. Thanks to Nate Lowrie. ++ Added showContainingPage() method to all ui controls, which will recursively + show any pages in any pageframes that contain this control. ++ Added showCurrentLine() to dEditor. Does what it says. ++ Datanav forms (AppWizard-generated) now look better as they have a bigger + default size. Thanks to Bill Anderson for bringing up lots of such issues. ++ Added AddChildEditPages property to datanav apps. Set it to False and you + stop getting the annoying edit pages for the child bizobjs. ++ Previously, you could only set page sizes in reports to strings like + "letter", "a4", etc. Now, you can also set explicit sizes such as + (100, 75) or ("1.75 in", "1 in"). ++ Added preliminary support for Microsoft SQL Server. This isn't usable yet + for any but the most tenacious developers, and likely quite buggy. If you + want to try it out or help develop it, please post a message to the dabo + developer's list ([email protected]). -Added a parameter to the promptForFileName() method to specify the default path for the dialog. ------------------------------------------------------------------------- -r1867 | ed | 2006-01-26 17:36:12 -0800 (Thu, 26 Jan 2006) | 9 lines +=============================================================================== +Dabo 0.6 (2006-03-27) (Revision 2043): -Added the TreeItemContextMenu event. This differs from the normal ContextMenuEvent in that it returns the itemID of the node that was right-clicked. ++ Fixed a problem when switching to the Browse page of the datanav grid without + first running a query. Also, there was an error being thrown if a previous + query had results, and a subsequent query had no results. -Added code in the event data gathering code to store the tree item ID for these events in EventData.itemID. ++ Modified the code in _setCurrentRow() of dGrid so that it wasn't calling + SetGridCursor() unless the position had actually changed. I had recorded up to + 10 calls to this function, all with the exact same values each time I switched + to the Browse page. -Changed all the names '_id' in the dTreeView.py file to the clearer 'itemID'. ++ Removed the code that lower-cased field names, as it was preventing the code + from working with case-sensitive backends and columns containing capital + letters. -Fixed an oversight in the dSizerMixin that didn't remove the Box for a dBorderSizer when the sizer was released. + Fixed a problem where str values were not able to be properly converted to + unicode. ++ Added a parameter to the promptForFileName() method to specify the default + path for the dialog. ------------------------------------------------------------------------- -r1872 | paul | 2006-01-27 08:01:09 -0800 (Fri, 27 Jan 2006) | 1 line ++ Added the TreeItemContextMenu event. This differs from the normal + ContextMenuEvent in that it returns the itemID of the node that was + right-clicked. -The double-Activate on Windows is really getting in the way. I haven't heard anything from my bug report yet, so I added workaround code to ignore the first Activate. ------------------------------------------------------------------------- -r1873 | ed | 2006-01-27 12:16:01 -0800 (Fri, 27 Jan 2006) | 2 lines ++ Added code in the event data gathering code to store the tree item ID for + these events in EventData.itemID. -Cleaned up the order of releasing child objects for sizers. Also fixed problem with releasing the box for border sizers. ++ Changed all the names '_id' in the dTreeView.py file to the clearer 'itemID'. ------------------------------------------------------------------------- -r1875 | ed | 2006-01-28 15:32:34 -0800 (Sat, 28 Jan 2006) | 2 lines ++ Fixed an oversight in the dSizerMixin that didn't remove the Box for a + dBorderSizer when the sizer was released. -Added getFunctionList() method to return a list of all 'class' and 'def' statements in the current file. ++ The double-Activate on Windows is really getting in the way. I haven't heard + anything from my bug report yet, so I added workaround code to ignore the + first Activate. ------------------------------------------------------------------------- -r1876 | echo | 2006-01-29 12:50:27 -0800 (Sun, 29 Jan 2006) | 3 lines ++ Cleaned up the order of releasing child objects for sizers. Also fixed problem + with releasing the box for border sizers. -First pass at integrating the dTable class into the dabo.db framework. Right now, if this works at all, it only works for SQLite. ++ Added getFunctionList() method to return a list of all 'class' and 'def' + statements in the current file. ++ First pass at integrating the dTable class into the dabo.db framework. Right + now, if this works at all, it only works for SQLite. ------------------------------------------------------------------------- -r1877 | ed | 2006-01-29 19:45:26 -0800 (Sun, 29 Jan 2006) | 2 lines ++ Fixed a bug wherein multiply-nested sizers might not release all of their + content when release(True) is called. -Fixed a bug wherein multiply-nested sizers might not release all of their content when release(True) is called. ++ Added a 'setInactive()' method that will hide the auto-complete popup if one + is visible. ------------------------------------------------------------------------- -r1878 | ed | 2006-01-29 20:37:07 -0800 (Sun, 29 Jan 2006) | 2 lines ++ Disabled the fillGrid()'s setting of focus to the grid, as it causes problems + with stealing focus away from another active form, at least on Windows. Also, + it seems that such code really doesn't belong inside the function to build the + grid, but perhaps we'll find it belongs somewhere else. -Added a 'setInactive()' method that will hide the auto-complete popup if one is visible. ++ The xml header wasn't being converted to native line endings. Fixed. ------------------------------------------------------------------------- -r1882 | paul | 2006-01-31 09:28:37 -0800 (Tue, 31 Jan 2006) | 1 line ++ No need to explicitly do the unicode conversion in the report fields, as that + is done in the report writer. -Disabled the fillGrid()'s setting of focus to the grid, as it causes problems with stealing focus away from another active form, at least on Windows. Also, it seems that such code really doesn't belong inside the function to build the grid, but perhaps we'll find it belongs somewhere else. ------------------------------------------------------------------------- -r1883 | paul | 2006-01-31 11:58:23 -0800 (Tue, 31 Jan 2006) | 1 line ++ Added a Refresh event. This is raised when dForm.refresh() is called. All + dPemMixin classes will receive it, and fire their refresh() hook method. -The xml header wasn't being converted to native line endings. Fixed. ------------------------------------------------------------------------- -r1884 | paul | 2006-01-31 16:09:18 -0800 (Tue, 31 Jan 2006) | 1 line ++ Added dynamic properties to most normal static properties. Example: given a + label and a function 'currTime()' in a form that returns the current time, + issuing the following: + label.DynamicCaption = label.Form.currTime + will result in the label's Caption property being updated every time + label.Form.refresh() is called. -No need to explicitly do the unicode conversion in the report fields, as that is done in the report writer. ------------------------------------------------------------------------- -r1885 | ed | 2006-01-31 16:25:28 -0800 (Tue, 31 Jan 2006) | 12 lines ++ Added two methods to dabo.ui for converting image data back to bitmaps and + images. These were necessary because I noticed that when Editor.py was called + from locations other than its own directory, the image file for the function + button was not found. The solution was to convert the .png file to a data + stream using wx.tools.img2py.py, and store that in Editor.py. -Added a Refresh event. This is raised when dForm.refresh() is called. All dPemMixin classes will receive it, and fire their refresh() hook method. ++ Can now set dApp.UI=None, and setup() won't try to load a UI. You have to do + it explicitly, though, such as: + app = dabo.dApp() + app.UI = None + app.setup() + --or-- + app = dabo.dApp(UI=None) + app.setup() -Added dynamic properties. Every property can be made dynamic by prefixing it with 'Dynamic'. Dynamic props are set to any callable function; when the object receives a Refresh event, the function's return value is used to set the value of the underlying property. ++ First crack at creating a double-buffered drawing surface. The new class, + 'dDrawPanel', is a subclass of dPanel, but has its repainting handled through + the double-buffer techniques outlined on the wxPython wiki. -[NOTE: The previous paragraph no longer applies.] ++ Bookmarks in dEditor now persist when you save the file. If you re-open a + saved file with bookmarks, they are restored. -Example: given a label and a function 'currTime()' in a form that returns the current time, issuing the following: ++ Refactored dUserSettingProvider a little bit. Fixed a bug in + getUserSettingKeys() that resulted in it always returning an empty list. Added + deleteUserSetting() and deleteAllUserSettings(); these do just what you think + they would. - label.DynamicCaption = label.Form.currTime - -will result in the label's Caption property being updated every time label.Form.refresh() is called with the value of the current time. ++ Changed a couple exec() calls to setattr() calls instead, which may be safer + if not faster, but definitely more explicit and easier to understand. -Also added two methods to dabo.ui for converting image data back to bitmaps and images. These were necessary because I noticed that when Editor.py was called from locations other than its own directory, the image file for the function button was not found. The solution was to convert the .png file to a data stream using wx.tools.img2py.py, and store that in Editor.py. ++ Implemented the handling of RowSpan/ColSpan for grid sizers. Added a + GridSizerSpanException class that is raised if an attempt to set the span to a + location that is already occupied. ------------------------------------------------------------------------- -r1889 | paul | 2006-02-01 16:23:51 -0800 (Wed, 01 Feb 2006) | 13 lines ++ Revamped the entire flow for transactions. These changes have been tested on + MySQL and SQLite, but still need to be tested with Firebird and PostgreSQL. -This commit lets you set dApp.UI=None, and setup() won't try to load a UI. -You have to do it explicitly, though, such as: ++ Changed the default for bizobjs, cursors, etc., to not autocommit. The + AutoCommit property of the bizobj is simply a pass-through to the cursor's + AutoCommit property. -app = dabo.dApp() -app.UI = None -app.setup() ++ Also cleaned up some inconsistent spacing and method ordering. ---or-- ++ Modified datanav to allow for manual setups that don't use fieldSpecs or + relationSpecs. I'll be committing a change to the AppWizard that allows + for this option soon. -app = dabo.dApp(UI=None) -app.setup() ++ Moved SelectPageClass, BrowsePageClass, and EditPageClass from PageFrame + to Form, since that is a better central location for these properties. ++ Added a splash screen to the Dabo app startup. This is based on Andrea + Gavana's AdvancedSplash class, and allows for cool shaped windows, etc. ------------------------------------------------------------------------- -r1890 | ed | 2006-02-02 05:13:52 -0800 (Thu, 02 Feb 2006) | 10 lines ++ Added the ability to set the DataSource to an object, rather than just a + string that can be eval'd to an object. -Major revamping of the whole refresh/update/dynamic design. ++ Changed the 'getMaxRow/Col' methods to 'getHighRow/Col' in order to avoid + confusion with the MaxRows/Cols props in dGridSizer. -First, refresh() simply repaints the object and anything contained in it. It simply calls the wx.Refresh() method. ++ Modified both sizer classes to accept windows and not just SizerItems when + setting/getting prop values. -There is now a method named 'update()' which will update any dynamic aspects of a control, such as its Dynamic* properties, or its data bindings, if any. If the object is a form, calling update triggers a ValueUpdate event that all data-aware controls will receive. All objects with children will raise an Update event in order to propagate the update message. You can call update() on a specific object, and only that object and its children will be updated. ++ Added the movePage() method, which takes either a page reference or a page + index, and moves the page to the specified position. The page is then + selected, unless the third parameter 'selecting' is False. -This clarifies the language we use: 'refresh' refers only to having the object repainted on the screen, while 'update' can change aspects of the object, such as its value or other properties. ++ Added a getInt() method to dabo.ui.uiwx. -Updated all the classes that referred to these events and methods by their old names. ++ Fixed the splashscreen display on Windows. ------------------------------------------------------------------------- -r1892 | ed | 2006-02-02 15:32:49 -0800 (Thu, 02 Feb 2006) | 3 lines ++ Added the ability to set the font face and size for the editor. -First crack at creating a double-buffered drawing surface. The new class, 'dDrawPanel', is a subclass of dPanel, but has its repainting handled through the double-buffer techniques outlined on the wxPython wiki. ++ Added the setCheck() method to dMenu. Given a caption, it will check any menus + whose captions match. By default it will uncheck any that don't match; you can + pass False as the second argument and leave non-matchers alone. Also added + clearChecks() to uncheck all menu items in a menu. ++ Exposed the FileName and FilePath properties in dEditor. ------------------------------------------------------------------------- -r1897 | ed | 2006-02-04 14:03:39 -0800 (Sat, 04 Feb 2006) | 4 lines ++ Added some syntax sugar for referring to fields and variables in reports. + Where you used to have to refer to self.Record["clientname"], you can now do + self.clientname. Same with self.Variables. -Bookmarks in dEditor now persist when you save the file. If you re-open a saved file with bookmarks, they are restored. ++ Added the 'callEvery' function to dabo.ui. This function accepts an interval + (in milliseconds), and callable reference, and optional arguments to that + callable. It then creates a timer that fires the callable every <interval> + milliseconds, passing along any optionally included arguments. The timer + reference is then returned, where it can be controlled by calling stop(), + start() or release(). This is based on the dCallEvery class that Brandon + Singer proposed. I made it a function in dabo.ui because I felt it was more + consistent with the existing functions callAfter() and callAfterInterval(). -Refactored dUserSettingProvider a little bit. Fixed a bug in getUserSettingKeys() that resulted in it always returning an empty list. Added deleteUserSetting() and deleteAllUserSettings(); these do just what you think they would. ++ Changed the default for forms to not automatically show "Record 1 of 0" or + similar meaningless database information in the status bar. Set it back to + True for the datanav Form class, so all datanav apps should remain unchanged. + All of the apps in the demo and IDE directories that don't query data, though, + no longer show that message. ------------------------------------------------------------------------- -r1902 | paul | 2006-02-06 08:32:50 -0800 (Mon, 06 Feb 2006) | 13 lines ++ Creating an instance of dApp doesn't automatically create an instance of + uiApp. Instead, it now asks dabo.ui to get it a reference, and dabo.ui either + returns the current instance if one already exists, or creates one if not. + This allows you to run wxPython apps from within wxPython apps. -Simplified dPemMixin's __getattr__ and __setattr__ somewhat. I still believe it -would be better to be explicit about dynamic properties, and will try to find -some time to make that happen. ++ Added some rudimentary support for file drag/drop. Right now, you can call + 'createFileDropTarget' on an object to make it able to respond to files + dropped on it. Pass in an optional handler object reference; otherwise, the + handler is set to the object itself. The drop event is passed on to the + handler by calling its 'processDroppedFiles' method, which should be + overridden in the handler object to do the specific processing of the files. -Changed a couple exec() calls to setattr() calls instead, which may be safer -if not faster, but definitely more explicit and easier to understand. ++ Added a 'Column' property to dEditor; this represents the column position in + the current line, and can be changed to move the cursor within the line. -Added back a needed test for deadObject that I removed from the onUpdate -callback, and changed the test in update() back to testing for the deadObject -instead of putting it in a try block. ++ Added option in getItemByRowCol() to return the sizer item in the given + position instead of the object managed by that sizer item. ++ Added method 'isItemChecked()' to allow you to determine the checked status of + any menu item. ------------------------------------------------------------------------ -r1904 | paul | 2006-02-06 16:36:58 -0800 (Mon, 06 Feb 2006) | 54 lines ++ Added dabo.ui.getMousePosition(), which returns the position of the mouse + on the screen. This is in contrast to dPemMixin.getMousePosition(), which + gets the position of the mouse inside the client window. -Added makeDynamicProperty() function to dabo.ui, which creates a dynamic -property definition for the passed normal property object. I wanted to put -this in propertyHelperMixin but it doesn't appear to me that dynamic -properties are really at all useful outside of a UI context (indeed, -everything else having to do with dynamic props is defined inside -dPemMixin...). ++ Update to allow execution of SQL statements without affecting the current data + set. The bizobj has a new pass-through method named 'execute()', which takes a + statement understood by the backend database and passes it to its cursor's + execute method. -Explicitly defined Dynamic properties for most of the existing properties -defined in dPemMixin. Removed the automagical __getattr__/__setattr__ -overrides. ++ The cursor class has been modified to run all statements that don't begin with + 'select' through its auxiliary cursor, thereby preserving its data set. + Preliminary tests that I've run have confirmed that these are working + correctly, but there should be a lot more testing done before I am confident + that these changes are truly sound and can handle whatever we can toss at them. -This dynamism is really cool, and I'm sorry that we aren't seeing completely -eye-to-eye on it. But here are some things that "just work" with my -implementation: ++ You can now set the DataSource to an actual object, instead of having to set + it to a string that could be resolved to an object. -1) Run SimpleFormWithBizobj, and in the command window type: -> def dfb(biz): -> return biz.ccity.strip() == "Arecibo" - -> self.PageFrame.Pages[2].setAll("DynamicFontBold", (dfb, self.getBizobj())) ++ Added basic support for storing lists/tuples in the user settings. -Now, go to the edit page and scroll through. The setAll() call just worked without -any changes needed. Something is keeping it working with the original implementation -but I admit that I don't see why, at first glance. ++ Added a simple way of persisting MRU lists in applications. A new dApp + property, '_persistentMRUs' is a dict that contains the name of the menu as + the key for the entry, and the function to bind the items to as the value. The + framework will then handle saving and restoring MRU lists upon app startup and + closing. -2) Notice when you are typing in the command window, that the dynamic properties -show up in the list. This is really what I mean when I talk about things being -documented. ++ Modified the uiApp to accept just the menu caption as an identifier instead of + requiring the actual menu. This is necessary to create MRU lists for context + menus, or for restoring menus at app startup. -3) Passing dynamic props to the constructor is the same as defining them in the class -txt = dabo.ui.dTextBox(self, DynamicEnabled=myFunc) -txt.DynamicFontItalic = myFunc ++ Updated the requirement that a bizobj be found for all data sources. Since + that was written, Dabo's use of data binding has expanded to lots of + non-bizobj uses. -Both of the above calls work as usual WRT the Dabo Property Interface. ++ Completed the majority of the work needed to implement saved classes that can + be used in other class designs; it was working from the Designer, but not when + you ran the form. These changes implement the whole inheritance structure so + that if you change the underlying class, any changes not explicitly overridden + in the design that uses that class are reflected. This works for both property + changes as well as code changes. -Granted, there's more work involved when defining a new class (gotta remember to tell -Python about the dynamic props). But after all is said, done, and considered, it is -my genuine hope and belief that this was the right way to go. But I am still sorry for -stepping on toes. ++ Switched the default order of arguments in callAfterInterval(). It makes more + sense to specify the interval first, followed by the function and its + arguments. Sticking the interval between the function and its arguments seems + very awkward. I added code to callAfterInterval() to check if it received a + call in which the interval is the second argument (i.e., the original style) + and switch them around in that event. -I'll follow through with making other properties (those outside dPemMixin) dynamic as -well. ++ Removed dDrawPanel as a class. Turns out that adding double-buffering to + panels doesn't affect their performance noticeably, so it made sense to turn + this on for all dPanel objects by default. However, if you run into a + situation where this adversely affects your app, there is a new property named + 'Buffered' that will turn this behavior off (i.e., make it work like it used + to) when set to False. -There are things to consider in the future, such as: + *IF YOU USED dDrawPanel IN YOUR CODE, THIS WILL BREAK IT!* You must update by + changing all references to dDrawPanel to simply dPanel. -+ Do we make a DynamicValue? -+ If so, does it override the value gotten from FieldSource, if set? -+ What bearing does this have on the dynamism already present in, e.g., -the setting of dynamic values from non-bizobj data bindings? ++ Removed the old syntax for begin/commit/rollbackTransaction. The default for + these actions in dBackendObject is to call the appropriate method on the + connection, not to execute a command on the cursor. -Anyway, thanks for putting in the Dynamic stuff, Ed. Once we take care of the refresh -overhead - perhaps by using the timer/observer-based approach I talked about this -morning - this is really going to be killer. ++ Removed the call to cursor.connection.begin() in the beginTransaction() + method. This does not seem to be needed for most backends; in fact, it is + typically used to override autocommit to create temporary explicit + transactions. ------------------------------------------------------------------------- -r1907 | ed | 2006-02-07 07:32:34 -0800 (Tue, 07 Feb 2006) | 2 lines ++ Table creation now works for MySQL also. The class dAutoBizobj is a bizobj + that has a dTable. The function AutoCreateTables() will try to create all the + tables that have been setup with dAutoBizobj objects. If it can't create the + tables, a message pops up for the user and the db admin. The db admin can + enter the username and password for access to create tables or the db admin + can manualy execute the queries in the queries.sql. -Implemented the handling of RowSpan/ColSpan for grid sizers. Added a GridSizerSpanException class that is raised if an attempt to set the span to a location that is already occupied. ++ Converted the dTimer from a bitmap to a non-visible control based directly on + wx.Timer. This makes it fit in much better with dabo.ui.callEvery(), which is + much more convenient to use in many cases. ------------------------------------------------------------------------- -r1909 | paul | 2006-02-07 12:43:44 -0800 (Tue, 07 Feb 2006) | 16 lines ++ Began coding for the Hover property, which will allow for easier visual coding + of MouseOver events. It isn't fully implemented yet, so don't try working with + it. -Sorted out some problems and redundancies in the update() cycle: ++ Implemented the Hover property in dPemMixin. The reason for this rather than + relying on MouseLeave to terminate the effect is that there are many time when + it seems that the mouse leaves the area without triggering the MouseLeave + event. The Hover mechanism employs a timer to check for mouse position, and + fire the MouseLeave code if it detects that the mouse position is outside of + the control. -+ Removed the update delays, as they caused other problems. ++ Added a CustomSQL property to the datanav form. If set, the settings in the + select page will be ignored and the contents of CustomSQL used instead. -+ Because of the recursive nature of the update() function, both ValueUpdate - and Update events were triggering the controls to update themselves. Removed - ValueUpdate event and consolidated into the update() cycle. ++ Added defaults to dGrid.getValue(). If no row or col is specified, it defaults + to the current row/column, respectively. -+ The Refresh() call inside update() was being called way too much. In testing - different ways to limit this refreshing, I discovered that for all the cases - I tested, the Refresh() wasn't needed at all. So I removed it. If you need - a refresh() you need to call that explicitly now. I think this may be better - anyway because they are different concepts. - -Performance still isn't stellar, but it does seem much better now. ++ Added fontMetricFromDrawObject() to dabo.ui. This enables simple calculation + of the (138360 bytes were truncated as it was too long for the email (max 40000 bytes.) _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
