| 1 |
Dabo 0.1.1 (2004-06-13): |
|---|
| 2 |
|
|---|
| 3 |
------------------------------------------------------------------------ |
|---|
| 4 |
r330 | ed | 2004-06-13 05:44:35 -0700 (Sun, 13 Jun 2004) | 6 lines |
|---|
| 5 |
|
|---|
| 6 |
Re-wrote the __setNonUpdateFields() method to be backend-agnostic. Also |
|---|
| 7 |
reduced the number of separate queries that were being run: previously, a |
|---|
| 8 |
query was run for each field in the cursor; now just one query is run, and |
|---|
| 9 |
the results are determined from that. Got to polish my list comprehension |
|---|
| 10 |
skills in the process <g>. |
|---|
| 11 |
|
|---|
| 12 |
------------------------------------------------------------------------ |
|---|
| 13 |
r329 | ed | 2004-06-12 14:41:02 -0700 (Sat, 12 Jun 2004) | 11 lines |
|---|
| 14 |
|
|---|
| 15 |
Removed the direct access of the cursor's native rowcount and rownumber |
|---|
| 16 |
properties, and replaced it with protected attributes __rownumber and |
|---|
| 17 |
__rowcount. Made the properties RowNumber and RowCount to get and set these |
|---|
| 18 |
properties. |
|---|
| 19 |
Also updated the SQL builder code to simplify the creation of the SQL |
|---|
| 20 |
statement. |
|---|
| 21 |
NOTE: the code recently added to use the cursor's description to determine |
|---|
| 22 |
non-updatable fields contains MySQL-specific code. Will have to test this |
|---|
| 23 |
with Firebird to make sure that the 'description' is correctly returned, and |
|---|
| 24 |
that the limit clause is correctly rendered. |
|---|
| 25 |
|
|---|
| 26 |
------------------------------------------------------------------------ |
|---|
| 27 |
r328 | ed | 2004-06-12 13:07:14 -0700 (Sat, 12 Jun 2004) | 3 lines |
|---|
| 28 |
|
|---|
| 29 |
Refactored getCursor() up to the base dBackend class, since the change Paul |
|---|
| 30 |
just made for dbFirebird.py also works fine for dbMySQL. |
|---|
| 31 |
|
|---|
| 32 |
------------------------------------------------------------------------ |
|---|
| 33 |
r327 | paul | 2004-06-12 12:47:41 -0700 (Sat, 12 Jun 2004) | 4 lines |
|---|
| 34 |
|
|---|
| 35 |
Fix dbFirebird.getCursor() to not hardcode the class mix, as it wasn't necessary. |
|---|
| 36 |
All I needed to do was to pass the connection instance to the cursor constructor. |
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
------------------------------------------------------------------------ |
|---|
| 40 |
r326 | paul | 2004-06-12 12:37:12 -0700 (Sat, 12 Jun 2004) | 9 lines |
|---|
| 41 |
|
|---|
| 42 |
Modify dSqlBuilderMixin to return the correct limit clause based |
|---|
| 43 |
on the backend in use. Firebird uses 'select first 1000...' while |
|---|
| 44 |
MySQL uses 'select ... limit 1000'. |
|---|
| 45 |
|
|---|
| 46 |
Add rownumber class variable to dCursorMixin which provides a |
|---|
| 47 |
temporary solution to the AttributeError when dbFirebird is the |
|---|
| 48 |
backend. |
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
------------------------------------------------------------------------ |
|---|
| 52 |
r325 | paul | 2004-06-12 11:27:04 -0700 (Sat, 12 Jun 2004) | 18 lines |
|---|
| 53 |
|
|---|
| 54 |
Change default __params value to the empty tuple in dBizobj. Since different |
|---|
| 55 |
backends expect different types for the params arg, modify dCursorMixin.execute |
|---|
| 56 |
to not send the params arg at all if it is None or otherwise empty. Tested with |
|---|
| 57 |
MySQL and Firebird: Ok. |
|---|
| 58 |
|
|---|
| 59 |
Modified dbFirebird's getCursor() to do the required mixing-in and to return |
|---|
| 60 |
a full Dabo cursor instance. dbFirebird now gets past all the initial errors |
|---|
| 61 |
in my wiz-generated test app. Next up: there is MySQL-specific code in my |
|---|
| 62 |
dPageDataNav code - dbFirebird is currently choking on the LIMIT clause. |
|---|
| 63 |
|
|---|
| 64 |
Modified dProgressDialog to properly react to exceptions that happen in the |
|---|
| 65 |
passed function. It used to be that if an exception happened in the requery() |
|---|
| 66 |
code, the dProgressDialog wouldn't handle it and therefore the worker thread |
|---|
| 67 |
would never return control back to the main thread. Now, control is returned |
|---|
| 68 |
and the main thread tries to show useful information about the exception. It |
|---|
| 69 |
is a start at least. |
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 |
------------------------------------------------------------------------ |
|---|
| 73 |
r324 | ed | 2004-06-11 18:02:38 -0700 (Fri, 11 Jun 2004) | 5 lines |
|---|
| 74 |
|
|---|
| 75 |
Abstracted the actual creation of the cursor into the specific backend |
|---|
| 76 |
objects. They will be passed the class of cursor to create; if they have an |
|---|
| 77 |
interface for specifying a cursor class, as MySQLdb does, it can be used; if |
|---|
| 78 |
not, it can be ignored. |
|---|
| 79 |
|
|---|
| 80 |
------------------------------------------------------------------------ |
|---|
| 81 |
r323 | ed | 2004-06-11 17:44:56 -0700 (Fri, 11 Jun 2004) | 7 lines |
|---|
| 82 |
|
|---|
| 83 |
Forgot to update these two files. |
|---|
| 84 |
|
|---|
| 85 |
For some reason, the log message for the last commit was lost. Here it is: |
|---|
| 86 |
Changed the method 'getCursor()' to 'getCursorClass()', since its purpose is |
|---|
| 87 |
to return the class, not the actual cursor |
|---|
| 88 |
|
|---|
| 89 |
|
|---|
| 90 |
------------------------------------------------------------------------ |
|---|
| 91 |
r322 | ed | 2004-06-11 17:43:02 -0700 (Fri, 11 Jun 2004) | 1 line |
|---|
| 92 |
|
|---|
| 93 |
|
|---|
| 94 |
------------------------------------------------------------------------ |
|---|
| 95 |
r321 | ed | 2004-06-11 17:41:49 -0700 (Fri, 11 Jun 2004) | 4 lines |
|---|
| 96 |
|
|---|
| 97 |
Added explicit import of the uiwx module. This is necessary for the |
|---|
| 98 |
single-file installer I'm working with, as it can't resolve the import files |
|---|
| 99 |
when they are not explicitly specified. |
|---|
| 100 |
|
|---|
| 101 |
------------------------------------------------------------------------ |
|---|
| 102 |
r320 | paul | 2004-06-11 16:15:07 -0700 (Fri, 11 Jun 2004) | 21 lines |
|---|
| 103 |
|
|---|
| 104 |
Interim commit. Firebird is closer to working. |
|---|
| 105 |
|
|---|
| 106 |
Add a connection reference to the dBackend object. |
|---|
| 107 |
|
|---|
| 108 |
Update getLastInsertID() code to take advantage of a feature commonly added |
|---|
| 109 |
to the various dbapi's that automatically saves the last insert id for us. |
|---|
| 110 |
MySQL has this feature; Firebird does not. |
|---|
| 111 |
|
|---|
| 112 |
Add some convenience functions to dBackend (with thin wrappers in dCursorMixin): |
|---|
| 113 |
+ getTables(): list of tables in the database |
|---|
| 114 |
+ getTableRecordCount(): count of records in the table |
|---|
| 115 |
+ getFields(): list of field names and field data types for the table |
|---|
| 116 |
|
|---|
| 117 |
Note that the field data types are expresses in fox-like 'I', 'N', etc. |
|---|
| 118 |
format. This is because there aren't a sufficient number of Python types |
|---|
| 119 |
to express all the possible database types (memo versus string, etc.) |
|---|
| 120 |
|
|---|
| 121 |
Firebird barfs with execute(sql, params=None), but both MySQL and Firebird can |
|---|
| 122 |
handle params=() so I made that generic change. |
|---|
| 123 |
|
|---|
| 124 |
|
|---|
| 125 |
------------------------------------------------------------------------ |
|---|
| 126 |
r319 | ed | 2004-06-11 15:01:52 -0700 (Fri, 11 Jun 2004) | 8 lines |
|---|
| 127 |
|
|---|
| 128 |
Added code for the cursorMixin to set its own superCursor reference if one |
|---|
| 129 |
isn't supplied. This will help in cases where this mixin class is used |
|---|
| 130 |
independently of the bizobj, which normally supplies that reference. Also |
|---|
| 131 |
wrapped references to the BackendObject property so that errors will not be |
|---|
| 132 |
thrown if this hasn't been set. If a developer wants to use this mixin |
|---|
| 133 |
outside of the framework, they will have to be responsible for setting this |
|---|
| 134 |
reference if they need to use any database-specific features. |
|---|
| 135 |
|
|---|
| 136 |
------------------------------------------------------------------------ |
|---|
| 137 |
r318 | ed | 2004-06-11 07:36:00 -0700 (Fri, 11 Jun 2004) | 5 lines |
|---|
| 138 |
|
|---|
| 139 |
Abstracted out the direct use of the cursor's _rows property, as this was a |
|---|
| 140 |
MySQLdb-specific implementation. The new property is named '_records', and |
|---|
| 141 |
is created by calling 'fetchall()' after the query is executed. |
|---|
| 142 |
|
|---|
| 143 |
|
|---|
| 144 |
------------------------------------------------------------------------ |
|---|
| 145 |
r317 | paul | 2004-06-10 16:52:35 -0700 (Thu, 10 Jun 2004) | 4 lines |
|---|
| 146 |
|
|---|
| 147 |
This commit makes Firebird cursors possible, but I'm not sure how the dictcursor |
|---|
| 148 |
stuff will resolve. I've verified that a connection is successful, but haven't |
|---|
| 149 |
verified that results can be obtained from the cursor yet. |
|---|
| 150 |
|
|---|
| 151 |
------------------------------------------------------------------------ |
|---|
| 152 |
r316 | paul | 2004-06-09 16:07:44 -0700 (Wed, 09 Jun 2004) | 1 line |
|---|
| 153 |
|
|---|
| 154 |
Attempting to reproduce Julian's tracebacks on Win32 but failed. I did note other oddities however, so for now I've disabled MDI Windows which makes the Windows version run just like the Linux version. |
|---|
| 155 |
------------------------------------------------------------------------ |
|---|
| 156 |
r315 | paul | 2004-06-09 15:44:14 -0700 (Wed, 09 Jun 2004) | 6 lines |
|---|
| 157 |
|
|---|
| 158 |
Fix some bugs in dConnectInfo that kept the wizMaintenanceApp from setting a |
|---|
| 159 |
valid dbConnectionDef.py file. |
|---|
| 160 |
|
|---|
| 161 |
Begin tweaking the Firebird classdef. |
|---|
| 162 |
|
|---|
| 163 |
|
|---|
| 164 |
------------------------------------------------------------------------ |
|---|
| 165 |
r314 | ed | 2004-06-09 08:16:23 -0700 (Wed, 09 Jun 2004) | 4 lines |
|---|
| 166 |
|
|---|
| 167 |
Added a rudimentary debugging dialog to the menu. Not quite a Command |
|---|
| 168 |
Window, but it at least allows for a little bit of interactive debugging. |
|---|
| 169 |
Eventually should be wrapped with a check for developer vs. user status. |
|---|
| 170 |
|
|---|
| 171 |
------------------------------------------------------------------------ |
|---|
| 172 |
r313 | ed | 2004-06-09 08:13:08 -0700 (Wed, 09 Jun 2004) | 2 lines |
|---|
| 173 |
|
|---|
| 174 |
Corrected reference that was throwing an error when working in the Designer. |
|---|
| 175 |
|
|---|
| 176 |
------------------------------------------------------------------------ |
|---|
| 177 |
r312 | ed | 2004-06-09 08:11:47 -0700 (Wed, 09 Jun 2004) | 2 lines |
|---|
| 178 |
|
|---|
| 179 |
Corrected problems integrating cursors with backend classes. |
|---|
| 180 |
|
|---|
| 181 |
------------------------------------------------------------------------ |
|---|
| 182 |
r311 | ed | 2004-06-09 08:11:30 -0700 (Wed, 09 Jun 2004) | 2 lines |
|---|
| 183 |
|
|---|
| 184 |
Corrected problems integrating cursors with backend classes. |
|---|
| 185 |
|
|---|
| 186 |
------------------------------------------------------------------------ |
|---|
| 187 |
r310 | ed | 2004-06-09 04:24:12 -0700 (Wed, 09 Jun 2004) | 3 lines |
|---|
| 188 |
|
|---|
| 189 |
Added stub files for Firebird and Sqlite. These are not tested at all, and |
|---|
| 190 |
will need to be completed with backend-specific code in order to work. |
|---|
| 191 |
|
|---|
| 192 |
------------------------------------------------------------------------ |
|---|
| 193 |
r309 | ed | 2004-06-07 14:11:10 -0700 (Mon, 07 Jun 2004) | 2 lines |
|---|
| 194 |
|
|---|
| 195 |
Added code to ignore the temp PK field when creating diffs. |
|---|
| 196 |
|
|---|
| 197 |
------------------------------------------------------------------------ |
|---|
| 198 |
r308 | ed | 2004-06-07 13:23:08 -0700 (Mon, 07 Jun 2004) | 3 lines |
|---|
| 199 |
|
|---|
| 200 |
Separated the processes of a) setting the FK link in a child and b) letting |
|---|
| 201 |
the child know the current state of its parent. |
|---|
| 202 |
|
|---|
| 203 |
------------------------------------------------------------------------ |
|---|
| 204 |
r307 | paul | 2004-06-07 13:11:11 -0700 (Mon, 07 Jun 2004) | 4 lines |
|---|
| 205 |
|
|---|
| 206 |
Remove svn:executable flags from some of the newly-added scripts. I |
|---|
| 207 |
think that this flag is getting added automagically for some reason. |
|---|
| 208 |
|
|---|
| 209 |
|
|---|
| 210 |
------------------------------------------------------------------------ |
|---|
| 211 |
r306 | ed | 2004-06-07 12:58:35 -0700 (Mon, 07 Jun 2004) | 2 lines |
|---|
| 212 |
|
|---|
| 213 |
Removed old code from my first pass at creating a saveProps stack. |
|---|
| 214 |
|
|---|
| 215 |
------------------------------------------------------------------------ |
|---|
| 216 |
r305 | ed | 2004-06-07 12:55:32 -0700 (Mon, 07 Jun 2004) | 9 lines |
|---|
| 217 |
|
|---|
| 218 |
Refactored the db classes to abstract out the backend-specific code into |
|---|
| 219 |
separate classes. There is now nothing MySQL-specific in the code (except, |
|---|
| 220 |
of course, the dbMySQL.py script!). Adding support for additional backends |
|---|
| 221 |
now will require adding a script for that backend's specific needs, and also |
|---|
| 222 |
an additional 'elif' statement in dConnectInfo.py. I changed to an if/elif |
|---|
| 223 |
structure instead of the eval() syntax because the this no longer requires |
|---|
| 224 |
that the database code be in the dBackend.py file, and the code no longer |
|---|
| 225 |
relies on naming conventions to work. |
|---|
| 226 |
|
|---|
| 227 |
------------------------------------------------------------------------ |
|---|
| 228 |
r304 | ed | 2004-06-04 05:53:29 -0700 (Fri, 04 Jun 2004) | 3 lines |
|---|
| 229 |
|
|---|
| 230 |
Added some defensive code to properly handle the new Form and Application |
|---|
| 231 |
properties when working from the Designer. |
|---|
| 232 |
|
|---|
| 233 |
------------------------------------------------------------------------ |
|---|
| 234 |
r303 | ed | 2004-05-28 05:09:59 -0700 (Fri, 28 May 2004) | 4 lines |
|---|
| 235 |
|
|---|
| 236 |
Corrected potential problem in scan() when it tries to restore its position |
|---|
| 237 |
to a row which no longer exists. In this case, it will set the row number to |
|---|
| 238 |
the last row in the data set. |
|---|
| 239 |
|
|---|
| 240 |
------------------------------------------------------------------------ |
|---|
| 241 |
r302 | paul | 2004-05-27 18:59:04 -0700 (Thu, 27 May 2004) | 10 lines |
|---|
| 242 |
|
|---|
| 243 |
Calling setChildLinkFilter() in requery() is too late, as the SQL |
|---|
| 244 |
has already been set with setSQL(), so for now I moved that from |
|---|
| 245 |
requery() to setSQL() although I'm not sure if that is correct, but |
|---|
| 246 |
it does work. |
|---|
| 247 |
|
|---|
| 248 |
Fix typo in dCursorMixin. |
|---|
| 249 |
|
|---|
| 250 |
See my next commit to appRecipes as well. |
|---|
| 251 |
|
|---|
| 252 |
|
|---|
| 253 |
------------------------------------------------------------------------ |
|---|
| 254 |
r301 | ed | 2004-05-27 14:12:19 -0700 (Thu, 27 May 2004) | 2 lines |
|---|
| 255 |
|
|---|
| 256 |
Corrected two typos in the prop defitions. |
|---|
| 257 |
|
|---|
| 258 |
------------------------------------------------------------------------ |
|---|
| 259 |
r300 | ed | 2004-05-27 14:11:40 -0700 (Thu, 27 May 2004) | 2 lines |
|---|
| 260 |
|
|---|
| 261 |
Removed old syntax for RowNumber, RowCount and the allrows parameters |
|---|
| 262 |
|
|---|
| 263 |
------------------------------------------------------------------------ |
|---|
| 264 |
r299 | ed | 2004-05-27 11:13:34 -0700 (Thu, 27 May 2004) | 45 lines |
|---|
| 265 |
|
|---|
| 266 |
dBizobj: |
|---|
| 267 |
- changed a single cursor reference to a list of cursors, keyed on parent |
|---|
| 268 |
key. For independent cursors, this key is simply None. |
|---|
| 269 |
- modified all methods to support this new cursor design. |
|---|
| 270 |
- created read-only property 'Cursor' which will return the current cursor. |
|---|
| 271 |
- removed getRowNumber(), setRowNumber() and getRowCount() methods. Replaced |
|---|
| 272 |
them with the properties RowNumber and RowCount. |
|---|
| 273 |
- removed temp PK generation and management. Moved that logic to the cursor |
|---|
| 274 |
class. |
|---|
| 275 |
- there is now isChanged(), which only tests the current row, and |
|---|
| 276 |
isAnyChanged(), which tests the entire recordset. |
|---|
| 277 |
- save(), cancel(), etc., no longer accept an 'allrows' parameter. Instead, |
|---|
| 278 |
there are new saveAll(), cancelAll(), etc. methods to be called. |
|---|
| 279 |
- added scan() function which takes a function that will be called once for |
|---|
| 280 |
each record in the current recordset. |
|---|
| 281 |
- added setChildLinkFilter() method, which tells the child bizobjs which |
|---|
| 282 |
cursor to use as their current cursor when the parent record changes. |
|---|
| 283 |
- added getChangedRecordNumbers(), which will return a list containing the |
|---|
| 284 |
record numbers of all records for which isChanged() returns True. Since the |
|---|
| 285 |
change might be in a related child record, a record number may appear in the |
|---|
| 286 |
list even though none of its fields have changed. |
|---|
| 287 |
- added getRecordStatus(), which accepts a record number as a parameter |
|---|
| 288 |
(default=current record). Will return a dictionary containing an element for |
|---|
| 289 |
each modified field. The field name will be the element key, and the element |
|---|
| 290 |
value will be a tuple whose zeroth element is the original value, and whose |
|---|
| 291 |
first element is its current value. |
|---|
| 292 |
|
|---|
| 293 |
dCursorMixin: |
|---|
| 294 |
- temp PK support is now handled here instead of the bizobj. |
|---|
| 295 |
- getPK() will return the temp PK for a new, unsaved record |
|---|
| 296 |
- implemented getRecordStatus() - see bizobj notes above. |
|---|
| 297 |
- fixed bug introduced into the SQL update statements wwhen datetime support was |
|---|
| 298 |
added. |
|---|
| 299 |
|
|---|
| 300 |
dSqlBuilderMixin: |
|---|
| 301 |
- added childFilterClause, to handle auto-filtering of child record sets by |
|---|
| 302 |
the parent FK. |
|---|
| 303 |
|
|---|
| 304 |
dForm: |
|---|
| 305 |
- removed references to 'allrows' in save(), cancel(), etc., and replaced |
|---|
| 306 |
them with the appropriate methods (saveAll(), etc.) |
|---|
| 307 |
|
|---|
| 308 |
dConstants: |
|---|
| 309 |
- added constant for the temp PK field name |
|---|
| 310 |
|
|---|
| 311 |
------------------------------------------------------------------------ |
|---|
| 312 |
r298 | paul | 2004-05-27 10:39:10 -0700 (Thu, 27 May 2004) | 3 lines |
|---|
| 313 |
|
|---|
| 314 |
Fix problem with setting the grid cursor column, where the |
|---|
| 315 |
current cursor column is -1. |
|---|
| 316 |
|
|---|
| 317 |
------------------------------------------------------------------------ |
|---|
| 318 |
r297 | paul | 2004-05-25 12:51:17 -0700 (Tue, 25 May 2004) | 3 lines |
|---|
| 319 |
|
|---|
| 320 |
Workaround to minor problem where the grid will scroll one column to the |
|---|
| 321 |
right and one row down when first instantiated. |
|---|
| 322 |
|
|---|
| 323 |
------------------------------------------------------------------------ |
|---|
| 324 |
r296 | paul | 2004-05-24 18:16:38 -0700 (Mon, 24 May 2004) | 1 line |
|---|
| 325 |
|
|---|
| 326 |
Fixes for Mac. |
|---|
| 327 |
------------------------------------------------------------------------ |
|---|
| 328 |
r295 | paul | 2004-05-24 17:44:27 -0700 (Mon, 24 May 2004) | 7 lines |
|---|
| 329 |
|
|---|
| 330 |
Rename properties dApp and dForm to Application and Form, respectively. |
|---|
| 331 |
Move the definition of Form out of dObject and into dPemMixin, as |
|---|
| 332 |
dObject was too low a location (outside of UI). |
|---|
| 333 |
|
|---|
| 334 |
|
|---|
| 335 |
|
|---|
| 336 |
|
|---|
| 337 |
------------------------------------------------------------------------ |
|---|
| 338 |
r294 | paul | 2004-05-24 12:40:29 -0700 (Mon, 24 May 2004) | 22 lines |
|---|
| 339 |
|
|---|
| 340 |
Add newlines and tabs to the output SQL in SQLBuilderMixin, as it makes |
|---|
| 341 |
it easier on the eyes for SQL debugging purposes. |
|---|
| 342 |
|
|---|
| 343 |
Add property dForm to all Dabo objects. Analagous to THISFORM in VFP, it |
|---|
| 344 |
will always contain a reference to the form. |
|---|
| 345 |
|
|---|
| 346 |
Add dGrid, a generic grid based on dControlMixin so it is a dObject. It |
|---|
| 347 |
implements its own DataSource property as it doesn't inherit from |
|---|
| 348 |
dDataControlMixin. Make dGridDataNav inherit from this new dGrid. Over |
|---|
| 349 |
time, I may move some behavior from dGridDataNav into dGrid if it seems |
|---|
| 350 |
like the behavior would apply to general dGrids. |
|---|
| 351 |
|
|---|
| 352 |
Make dForm.getBizobj() descend into the child bizobj hierarchy to find |
|---|
| 353 |
the referenced dataSource. Previously, only top-level bizobjs as registered |
|---|
| 354 |
with dForm.addBizobj() were searched. |
|---|
| 355 |
|
|---|
| 356 |
Add properties SelectPageClass, BrowsePageClass, EditPageClass, and |
|---|
| 357 |
ChildPageClass to dPageFrameDataNav, which allows for easy user-overriding |
|---|
| 358 |
of the pages in the dFormDataNav framework. Add property DefaultPagesOnLoad, |
|---|
| 359 |
which turns on/off the default select/browse/edit/child pages. |
|---|
| 360 |
|
|---|
| 361 |
|
|---|
| 362 |
------------------------------------------------------------------------ |
|---|
| 363 |
r293 | paul | 2004-05-21 13:25:43 -0700 (Fri, 21 May 2004) | 11 lines |
|---|
| 364 |
|
|---|
| 365 |
Introduce dDateControl, a composite control for editing date values. It is |
|---|
| 366 |
very crude, but it did work in my test - it kept in sync with the bizobj. |
|---|
| 367 |
|
|---|
| 368 |
Modify update and insert code in dCursorMixin to properly format dates for |
|---|
| 369 |
saving to MySQL - it wasn't putting quotes around the values. Put in |
|---|
| 370 |
comments regarding MySQL-specific code. |
|---|
| 371 |
|
|---|
| 372 |
Tested working with dates in the UI and saving to MySQL, and it seemed to |
|---|
| 373 |
work just fine. |
|---|
| 374 |
|
|---|
| 375 |
|
|---|
| 376 |
------------------------------------------------------------------------ |
|---|
| 377 |
r292 | paul | 2004-05-20 14:44:18 -0700 (Thu, 20 May 2004) | 7 lines |
|---|
| 378 |
|
|---|
| 379 |
Remove minor cruft from dFormMixin. Make it load the smaller 048 Dabo icon |
|---|
| 380 |
by default. |
|---|
| 381 |
|
|---|
| 382 |
Add an icon to the login form by converting dLogin.Icon to a bitmap. |
|---|
| 383 |
|
|---|
| 384 |
|
|---|
| 385 |
|
|---|
| 386 |
------------------------------------------------------------------------ |
|---|
| 387 |
r291 | paul | 2004-05-19 17:47:07 -0700 (Wed, 19 May 2004) | 16 lines |
|---|
| 388 |
|
|---|
| 389 |
Add a place for messages to be added to the login form, and set up |
|---|
| 390 |
dSecurityManager to pass on informative messages during the login |
|---|
| 391 |
process. |
|---|
| 392 |
|
|---|
| 393 |
Add logged-in user name to the caption of the main form. Display |
|---|
| 394 |
the application name in the caption of the login form. |
|---|
| 395 |
|
|---|
| 396 |
Move the ordering of app instantiation steps around somewhat so that |
|---|
| 397 |
the login form displays before the main form. Now, you only get to |
|---|
| 398 |
see the main form after a successful login. |
|---|
| 399 |
|
|---|
| 400 |
Base dDialog on dFormMixin, which lets it harness some useful form |
|---|
| 401 |
properties. |
|---|
| 402 |
|
|---|
| 403 |
|
|---|
| 404 |
|
|---|
| 405 |
------------------------------------------------------------------------ |
|---|
| 406 |
r290 | ed | 2004-05-19 16:37:21 -0700 (Wed, 19 May 2004) | 11 lines |
|---|
| 407 |
|
|---|
| 408 |
Corrected really stupid bug in the cursor mixin where the _blank dictionary |
|---|
| 409 |
was being added to the result set, instead of a copy of it. This meant that |
|---|
| 410 |
changing the new record changed the 'blank' template, and subsequent new |
|---|
| 411 |
records were just adding new references to the same dictionary. |
|---|
| 412 |
|
|---|
| 413 |
Added support for temp PKs for new records. Child records will get those |
|---|
| 414 |
temp PKs as their linked FKs. Work still needs to be done when saving a new |
|---|
| 415 |
parent record to ensure that its new PK is propagated down to its new |
|---|
| 416 |
children. |
|---|
| 417 |
|
|---|
| 418 |
|
|---|
| 419 |
------------------------------------------------------------------------ |
|---|
| 420 |
r289 | ed | 2004-05-19 13:02:56 -0700 (Wed, 19 May 2004) | 6 lines |
|---|
| 421 |
|
|---|
| 422 |
Modified the bizobj to handle 'backfilling' the FK links in child records |
|---|
| 423 |
added to a newly-created parent record. |
|---|
| 424 |
|
|---|
| 425 |
This has only been tested marginally, so Paul, please let me know how it |
|---|
| 426 |
works with the changes you are making to the recipes demo. |
|---|
| 427 |
|
|---|
| 428 |
------------------------------------------------------------------------ |
|---|
| 429 |
r288 | paul | 2004-05-19 11:55:43 -0700 (Wed, 19 May 2004) | 18 lines |
|---|
| 430 |
|
|---|
| 431 |
Introduce dSecurityManager, which handles validating a user login and caching |
|---|
| 432 |
group membership information. Introduce property SecurityManager to dApp |
|---|
| 433 |
object, allowing users to subclass dSecurityManager to do what they need it |
|---|
| 434 |
to do, and then attach an instance of their subclass to dApp. |
|---|
| 435 |
|
|---|
| 436 |
Make dApp check with the SecurityManager if available, before starting the |
|---|
| 437 |
main application event loop. |
|---|
| 438 |
|
|---|
| 439 |
Introduce new UI class dDialog, which is a very simple frame usually meant |
|---|
| 440 |
to be shown modally and to return a value. Introduce new UI class dLogin, |
|---|
| 441 |
which is a basic login form. |
|---|
| 442 |
|
|---|
| 443 |
Wrap some property docstrings in _(). |
|---|
| 444 |
|
|---|
| 445 |
Start experimenting with Accelerator Tables, which can be used to workaround |
|---|
| 446 |
the lack of Cancel and Default properties in command buttons. |
|---|
| 447 |
|
|---|
| 448 |
|
|---|
| 449 |
------------------------------------------------------------------------ |
|---|
| 450 |
r287 | paul | 2004-05-18 18:01:26 -0700 (Tue, 18 May 2004) | 13 lines |
|---|
| 451 |
|
|---|
| 452 |
Create common ancestor object for all dabo objects, and christen it |
|---|
| 453 |
'dObject'. Not all Dabo objects inherit from this yet, and perhaps not |
|---|
| 454 |
all ever will - there is little reason for dCursorMixin to inherit from |
|---|
| 455 |
it, for example. The intent was for there to be some commonality in the |
|---|
| 456 |
public interface for all Dabo objects. |
|---|
| 457 |
|
|---|
| 458 |
Move some of the more common stuff out of ui/uiwx/classes/dPemMixin and |
|---|
| 459 |
into the new common/dObject. |
|---|
| 460 |
|
|---|
| 461 |
Add docstrings to the properties in dabo.db.dConnectInfo. |
|---|
| 462 |
|
|---|
| 463 |
|
|---|
| 464 |
|
|---|
| 465 |
------------------------------------------------------------------------ |
|---|
| 466 |
r286 | paul | 2004-05-18 13:55:40 -0700 (Tue, 18 May 2004) | 42 lines |
|---|
| 467 |
|
|---|
| 468 |
Rename dGrid to dGridDataNav, as it is really not meant as a general |
|---|
| 469 |
grid control but rather to fit in with the dFormDataNav subframework. |
|---|
| 470 |
It assumes that it is a member of a dPageDataNav, for instance. At |
|---|
| 471 |
some point, we'll want to define a basic dGrid which dGridDataNav will |
|---|
| 472 |
inherit, but the grid is one of the most complex UI controls so it'll |
|---|
| 473 |
have to wait for now. |
|---|
| 474 |
|
|---|
| 475 |
Add new property, FormType, to dFormDataNav. There is 'Normal', which |
|---|
| 476 |
is a normal form with Select/Browse/Edit/n childview pages; 'PickList' |
|---|
| 477 |
which doesn't display the edit/childview pages and is intended to be |
|---|
| 478 |
used to pick a record from a lookup; and 'Edit' which isn't implemented |
|---|
| 479 |
yet but will only display the edit page(s) for the record with the |
|---|
| 480 |
given pk value. |
|---|
| 481 |
|
|---|
| 482 |
Add new event, EVT_ITEMPICKED, for use by dFormDataNav when instantiated |
|---|
| 483 |
as a picklist. |
|---|
| 484 |
|
|---|
| 485 |
Make dGrid behave differently in several places, depending on whether |
|---|
| 486 |
its form is a picklist or a normal nav form. |
|---|
| 487 |
|
|---|
| 488 |
Make the picklist form close upon a keypress of Escape. Make the toolbar/ |
|---|
| 489 |
navigation menu display only the appropriate items depending on FormType. |
|---|
| 490 |
|
|---|
| 491 |
Define a childBehavior dict in dFormDataNav, which lets subclasses |
|---|
| 492 |
define certain things about how the childview page(s) will behave. Note |
|---|
| 493 |
that this isn't how I want it to stay, this was just to get up and |
|---|
| 494 |
running. Eventually, users will be able to easily subclass all of the |
|---|
| 495 |
separate components of dFormDataNav, not merely the form itself, and |
|---|
| 496 |
there will be appropriate hooks where they can put their code. |
|---|
| 497 |
|
|---|
| 498 |
Update the childview page to add and delete child records. Editing child |
|---|
| 499 |
records isn't implemented yet. Note that until the non-unique pk problem |
|---|
| 500 |
is fixed as discussed this morning, weird things can happen when adding |
|---|
| 501 |
child records, especially more than one of them, and it will fail if you |
|---|
| 502 |
try to add child records to a newly-added parent record. |
|---|
| 503 |
|
|---|
| 504 |
-- |
|---|
| 505 |
|
|---|
| 506 |
(I also just tweaked my svn-repository commit-notify email script, to |
|---|
| 507 |
hopefully not give the diff of deleted files. So, if it worked, there |
|---|
| 508 |
should not be a diff for the deleted dGrid.py.) |
|---|
| 509 |
|
|---|
| 510 |
------------------------------------------------------------------------ |
|---|
| 511 |
r285 | ed | 2004-05-17 09:45:13 -0700 (Mon, 17 May 2004) | 4 lines |
|---|
| 512 |
|
|---|
| 513 |
Removed the beforeConnection() and afterConnection() methods, as they are |
|---|
| 514 |
not implemented anywhere in the code. Use beforeCreateCursor() and |
|---|
| 515 |
afterCreateCursor() instead. |
|---|
| 516 |
|
|---|
| 517 |
------------------------------------------------------------------------ |
|---|
| 518 |
r284 | ed | 2004-05-17 06:58:50 -0700 (Mon, 17 May 2004) | 3 lines |
|---|
| 519 |
|
|---|
| 520 |
Changed the way the testing sql expression is generated in the |
|---|
| 521 |
__setNonUpdateFields() method. |
|---|
| 522 |
|
|---|
| 523 |
------------------------------------------------------------------------ |
|---|
| 524 |
r283 | ed | 2004-05-17 05:18:49 -0700 (Mon, 17 May 2004) | 2 lines |
|---|
| 525 |
|
|---|
| 526 |
Stupid typo! |
|---|
| 527 |
|
|---|
| 528 |
------------------------------------------------------------------------ |
|---|
| 529 |
r282 | ed | 2004-05-17 05:10:39 -0700 (Mon, 17 May 2004) | 2 lines |
|---|
| 530 |
|
|---|
| 531 |
Implemented the FillLinkFromParent logic for child bizobjs. |
|---|
| 532 |
|
|---|
| 533 |
------------------------------------------------------------------------ |
|---|
| 534 |
r281 | ed | 2004-05-16 18:27:26 -0700 (Sun, 16 May 2004) | 17 lines |
|---|
| 535 |
|
|---|
| 536 |
Modified the cursor to handle calculated and derived fields that are not to |
|---|
| 537 |
be included in updates to the backend database. The cursor mixin class has a |
|---|
| 538 |
user-editable list property called 'nonUpdateFields', and there is a private |
|---|
| 539 |
list property named '__nonUpdateFields' that is set by the cursor mixin |
|---|
| 540 |
after each requery. For most cases, the built-in behavior should suffice to |
|---|
| 541 |
prevent illegal update statements resulting from trying to update a derived |
|---|
| 542 |
field. The user-configurable property is there to allow the user to specify |
|---|
| 543 |
additonal fields to be ignored during an update. |
|---|
| 544 |
|
|---|
| 545 |
The list of user-defined non-updatable fields is set by the bizobj's |
|---|
| 546 |
'NonUpdateFields' property. Accessing the NonUpdateFields property will |
|---|
| 547 |
return the concatenated list of the public and private non-update lists. |
|---|
| 548 |
|
|---|
| 549 |
Also fixed a bunch of edge conditions dealing with the fact that until a |
|---|
| 550 |
query is run, the cursor doesn't have many of the attributes that were |
|---|
| 551 |
expected, such as _rows, rownumber, etc. |
|---|
| 552 |
|
|---|
| 553 |
------------------------------------------------------------------------ |
|---|
| 554 |
r280 | ed | 2004-05-16 18:13:19 -0700 (Sun, 16 May 2004) | 3 lines |
|---|
| 555 |
|
|---|
| 556 |
Changed delete() to first check if there is a record in the current |
|---|
| 557 |
recordset to be deleted. |
|---|
| 558 |
|
|---|
| 559 |
------------------------------------------------------------------------ |
|---|
| 560 |
r279 | paul | 2004-05-16 13:04:27 -0700 (Sun, 16 May 2004) | 1 line |
|---|
| 561 |
|
|---|
| 562 |
Oops... here is my last commit but with the scrollbars working. |
|---|
| 563 |
------------------------------------------------------------------------ |
|---|
| 564 |
r278 | paul | 2004-05-16 12:11:18 -0700 (Sun, 16 May 2004) | 12 lines |
|---|
| 565 |
|
|---|
| 566 |
Introduce new dScrollPanel control, which is a dPanel but with scrollbars. |
|---|
| 567 |
This control needs to be worked on some more, to add properties for specifying |
|---|
| 568 |
scrollbar behavior and increments. As it stands, it does a pretty good job of |
|---|
| 569 |
automatically setting itself up. |
|---|
| 570 |
|
|---|
| 571 |
Make dPage inherit from dScrollPanel instead of dPanel, so that scrollbars |
|---|
| 572 |
are available on dPage's by default. |
|---|
| 573 |
|
|---|
| 574 |
Refactor some of the browse page in dFormDataNav, fixing a problem that would |
|---|
| 575 |
occur when the rownum changed when the browse page wasn't the active page. |
|---|
| 576 |
|
|---|
| 577 |
|
|---|
| 578 |
------------------------------------------------------------------------ |
|---|
| 579 |
r277 | paul | 2004-05-16 10:33:08 -0700 (Sun, 16 May 2004) | 4 lines |
|---|
| 580 |
|
|---|
| 581 |
BugFix: After one of my last commits, SimpleFormWithControls and DaboDesigner |
|---|
| 582 |
failed to start, because they don't use the dApp application object. |
|---|
| 583 |
|
|---|
| 584 |
|
|---|
| 585 |
------------------------------------------------------------------------ |
|---|
| 586 |
r276 | paul | 2004-05-15 23:27:34 -0700 (Sat, 15 May 2004) | 16 lines |
|---|
| 587 |
|
|---|
| 588 |
Fix dGrid's newRecord(), editRecord(), and deleteRecord() functions to |
|---|
| 589 |
not eat exceptions. |
|---|
| 590 |
|
|---|
| 591 |
Fix bug introduced with my last commit that kept the form size/position |
|---|
| 592 |
from being restored because I overrode OnActivate() without running |
|---|
| 593 |
doDefault(). |
|---|
| 594 |
|
|---|
| 595 |
Change the saving of form size/position to use the absolute name rather |
|---|
| 596 |
than just the plain name. |
|---|
| 597 |
|
|---|
| 598 |
Implement deleting child records in dFormDataNav. Attempted to begin |
|---|
| 599 |
implementation of adding new child records, but ran into a problem with |
|---|
| 600 |
dCursorMixin and/or dBizobj that I posted a separate message regarding. |
|---|
| 601 |
|
|---|
| 602 |
|
|---|
| 603 |
|
|---|
| 604 |
------------------------------------------------------------------------ |
|---|
| 605 |
r275 | paul | 2004-05-15 16:46:18 -0700 (Sat, 15 May 2004) | 30 lines |
|---|
| 606 |
|
|---|
| 607 |
Add property dApp to dPemMixin, a reference to the dApp application object |
|---|
| 608 |
when dApp is present or None. This gives convenient access to dApp from |
|---|
| 609 |
all controls that inherit from dPemMixin (almost all Dabo controls and |
|---|
| 610 |
forms). |
|---|
| 611 |
|
|---|
| 612 |
Make dApp inherit from PropertyHelperMixin and DoDefaultMixin to conform |
|---|
| 613 |
to most of the rest of the Dabo objects. |
|---|
| 614 |
|
|---|
| 615 |
Add property AutoNegotiateUniqueNames to dApp, default True. When true, |
|---|
| 616 |
if an object tries to name itself identical to a sibling, a unique name |
|---|
| 617 |
will be found by appending an integer at the end. When false, a NameError |
|---|
| 618 |
will be raised which was the previous behavior. |
|---|
| 619 |
|
|---|
| 620 |
The auto-negotiation of names is definitely implicit, and could potentially |
|---|
| 621 |
cause confusion when debugging problems. Consider: |
|---|
| 622 |
|
|---|
| 623 |
self.addObject(dabo.ui.dCheckBox, 'myCheckbox') |
|---|
| 624 |
self.addObject(dabo.ui.dCheckBox, 'myCheckbox') |
|---|
| 625 |
|
|---|
| 626 |
No errors would have been raised, and two checkboxes got created, but |
|---|
| 627 |
the second checkbox got a name that differs from the name specified by the |
|---|
| 628 |
programmer ('myCheckbox1' instead of 'myCheckbox'). |
|---|
| 629 |
|
|---|
| 630 |
I think the convenience outweighs the concerns about implicitness, but |
|---|
| 631 |
would be willing to change the default to False instead of True, which may |
|---|
| 632 |
be better as the programmer would have to explicity tell dApp to act |
|---|
| 633 |
implicitly, and presumably understand the consequences by doing so. |
|---|
| 634 |
|
|---|
| 635 |
|
|---|
| 636 |
|
|---|
| 637 |
------------------------------------------------------------------------ |
|---|
| 638 |
r274 | paul | 2004-05-15 14:53:28 -0700 (Sat, 15 May 2004) | 5 lines |
|---|
| 639 |
|
|---|
| 640 |
Add property RequeryOnLoad to dFormDataNav, default False. Add code in |
|---|
| 641 |
dFormDataNav to check the value of the propery and run the requery if |
|---|
| 642 |
appropriate. |
|---|
| 643 |
|
|---|
| 644 |
|
|---|
| 645 |
------------------------------------------------------------------------ |
|---|
| 646 |
r273 | paul | 2004-05-14 20:59:12 -0700 (Fri, 14 May 2004) | 11 lines |
|---|
| 647 |
|
|---|
| 648 |
Move setting dTextBox.SelectOnEntry from afterInit() to initProperties(), |
|---|
| 649 |
where the user still has a chance to override. |
|---|
| 650 |
|
|---|
| 651 |
Change name of properties SpinnerLowValue and SpinnerHighValue to Min |
|---|
| 652 |
and Max, respectively. Remove the setting of default min/max values. |
|---|
| 653 |
|
|---|
| 654 |
Add spinner for setting the limit to the select page of dFormDataNav. |
|---|
| 655 |
|
|---|
| 656 |
|
|---|
| 657 |
|
|---|
| 658 |
|
|---|
| 659 |
------------------------------------------------------------------------ |
|---|
| 660 |
r272 | ed | 2004-05-14 05:05:51 -0700 (Fri, 14 May 2004) | 4 lines |
|---|
| 661 |
|
|---|
| 662 |
Cleaned up problem when a save() was called and no changes were needed. Also |
|---|
| 663 |
removed a problem in the cursor where a conflict between Unicode and String |
|---|
| 664 |
types was causing errors to be thrown. |
|---|
| 665 |
|
|---|
| 666 |
------------------------------------------------------------------------ |
|---|
| 667 |
r271 | ed | 2004-05-14 04:55:26 -0700 (Fri, 14 May 2004) | 26 lines |
|---|
| 668 |
|
|---|
| 669 |
Removed the calls to requeryAllChildren() and afterPointerMove() from the |
|---|
| 670 |
bizobj. Added those calls as an option to the seek() method. |
|---|
| 671 |
|
|---|
| 672 |
The first two methods are "for internal use only", and should never be called from |
|---|
| 673 |
an app. They exist so that the bizobj can move the pointer to where it needs |
|---|
| 674 |
to be without triggering a slew of additional effects. |
|---|
| 675 |
|
|---|
| 676 |
moveToPK() is only used in a requery() to try to restore the record pointer |
|---|
| 677 |
to the PK of the record it was on before the cursror was requeried. It is |
|---|
| 678 |
followed by a call to requeryAllChildren() and afterPointerMove() in that |
|---|
| 679 |
method; calling it again from this one is just inefficient.. |
|---|
| 680 |
|
|---|
| 681 |
moveToRowNum() is called by the validate() method so that a bizobj can check |
|---|
| 682 |
all of its records. You don't want it requerying its children, as they will |
|---|
| 683 |
need to be validated separately, and will be called in turn. |
|---|
| 684 |
|
|---|
| 685 |
In VFP Codebook, these methods are protected. For record pointer movement |
|---|
| 686 |
from within an app, the public methods first(), next(), etc., should be used |
|---|
| 687 |
to move the record pointer. |
|---|
| 688 |
|
|---|
| 689 |
Since seek() is intended to be called both internally and from developer's |
|---|
| 690 |
code, I've added a parameter 'runRequery' which defaults to False. If this |
|---|
| 691 |
value is passed as True, requeryAllChildren() and afterPointerMove() will be |
|---|
| 692 |
called if the cursor moves the pointer. |
|---|
| 693 |
|
|---|
| 694 |
|
|---|
| 695 |
------------------------------------------------------------------------ |
|---|
| 696 |
r270 | paul | 2004-05-13 22:17:15 -0700 (Thu, 13 May 2004) | 34 lines |
|---|
| 697 |
|
|---|
| 698 |
Bugfix: refactor old pre-dException code in dBizobj.requeryAllChildren(). |
|---|
| 699 |
|
|---|
| 700 |
Tried to change default of dBizobj.RequeryOnLoad() to False instead |
|---|
| 701 |
of True, but look at that it was already set to False. I guess I |
|---|
| 702 |
slipped this in before and forgot. I'll fix the demos. |
|---|
| 703 |
|
|---|
| 704 |
Recently, when we started forcing unique sibling names, I made the |
|---|
| 705 |
constructor append the id of the control to make the name unique if |
|---|
| 706 |
needed. I've improved this somewhat by making it an auto-incrementing |
|---|
| 707 |
integer instead (txt1, txt2, txt3, etc.). |
|---|
| 708 |
|
|---|
| 709 |
Add event handlers OnCreateWindow and OnDestroyWindow, and bind them |
|---|
| 710 |
to EVT_WINDOW_CREATE and EVT_WINDOW_DESTROY for all controls. |
|---|
| 711 |
|
|---|
| 712 |
Add new dEvent, EVT_VALUECHANGED, and raise this event whenever a |
|---|
| 713 |
control's value changes, whether programatically or interactively. |
|---|
| 714 |
|
|---|
| 715 |
Add new function getAbsoluteName() to dPemMixin, which returns self's |
|---|
| 716 |
fully-qualified name, such as 'dFormRecipes.dPageFrame.Page1.txtName'. |
|---|
| 717 |
|
|---|
| 718 |
Remove the property list for the form being output to the shell, which |
|---|
| 719 |
was causing problems on Windows and isn't necessary anyway. |
|---|
| 720 |
|
|---|
| 721 |
Refactor some of the Select page in dFormDataNav, and make the select |
|---|
| 722 |
checkboxes and textboxes persist their values to the user settings |
|---|
| 723 |
table. Now the select page will remember what you last searched on |
|---|
| 724 |
and present it to you for convenience. |
|---|
| 725 |
|
|---|
| 726 |
Actually, that persisting of values that I use in the select page is |
|---|
| 727 |
now available for all data controls, by setting the new property |
|---|
| 728 |
SaveRestoreValue. |
|---|
| 729 |
|
|---|
| 730 |
|
|---|
| 731 |
|
|---|
| 732 |
------------------------------------------------------------------------ |
|---|
| 733 |
r269 | ed | 2004-05-13 14:38:44 -0700 (Thu, 13 May 2004) | 3 lines |
|---|
| 734 |
|
|---|
| 735 |
Trapped the NoRecordsException when clicking on headers of grids with no |
|---|
| 736 |
records. |
|---|
| 737 |
|
|---|
| 738 |
------------------------------------------------------------------------ |
|---|
| 739 |
r268 | paul | 2004-05-12 17:21:03 -0700 (Wed, 12 May 2004) | 8 lines |
|---|
| 740 |
|
|---|
| 741 |
Bug fix: when the record changed and a control was active, dForm would |
|---|
| 742 |
inappropriately raise an exception because it was checking for a non- |
|---|
| 743 |
existent return value. |
|---|
| 744 |
|
|---|
| 745 |
Set internal _curVal when the control refreshes, to avoid unnecessary |
|---|
| 746 |
calls to the bizobj during flushValue() and possibly other places. |
|---|
| 747 |
|
|---|
| 748 |
|
|---|
| 749 |
------------------------------------------------------------------------ |
|---|
| 750 |
r267 | paul | 2004-05-12 17:08:40 -0700 (Wed, 12 May 2004) | 1 line |
|---|
| 751 |
|
|---|
| 752 |
Fix lame bug introduced with that last commit. |
|---|
| 753 |
------------------------------------------------------------------------ |
|---|
| 754 |
r266 | paul | 2004-05-12 17:04:00 -0700 (Wed, 12 May 2004) | 2 lines |
|---|
| 755 |
|
|---|
| 756 |
Work around AttributeError on Mac. |
|---|
| 757 |
|
|---|
| 758 |
------------------------------------------------------------------------ |
|---|
| 759 |
r265 | paul | 2004-05-12 16:59:35 -0700 (Wed, 12 May 2004) | 2 lines |
|---|
| 760 |
|
|---|
| 761 |
Workaround so that the navigation menu in dFormDataNav works on Mac. |
|---|
| 762 |
|
|---|
| 763 |
------------------------------------------------------------------------ |
|---|
| 764 |
r264 | paul | 2004-05-11 20:22:58 -0700 (Tue, 11 May 2004) | 18 lines |
|---|
| 765 |
|
|---|
| 766 |
The user can use bizobj.validateRecord() in a couple ways: |
|---|
| 767 |
1) return errorMessageText, and dBizobj will raise the exception |
|---|
| 768 |
2) raise the exception itself. |
|---|
| 769 |
In case #2, None is returned, resulting in an exception in dBizobj. |
|---|
| 770 |
This code fixes that. |
|---|
| 771 |
|
|---|
| 772 |
If a user were to requery, and then answer yes to save changes, but |
|---|
| 773 |
the save failed, the requery would happen anyway, wiping out all |
|---|
| 774 |
their changes. This code fixes that. |
|---|
| 775 |
|
|---|
| 776 |
There are still some funky problems though. Do this: |
|---|
| 777 |
1) add a new record and save |
|---|
| 778 |
2) add a new record and make the bizrule fail. |
|---|
| 779 |
Note that the bizrule error text is listed twice, and that the browse |
|---|
| 780 |
screen has reverted the original successfully-saved record back to the |
|---|
| 781 |
value it had when it was new. |
|---|
| 782 |
|
|---|
| 783 |
|
|---|
| 784 |
------------------------------------------------------------------------ |
|---|
| 785 |
r263 | paul | 2004-05-11 12:52:02 -0700 (Tue, 11 May 2004) | 2 lines |
|---|
| 786 |
|
|---|
| 787 |
Update changelog for 0.1 with the property list change. |
|---|
| 788 |
|
|---|
| 789 |
------------------------------------------------------------------------ |
|---|
| 790 |
|
|---|
| 791 |
|
|---|
| 792 |
|
|---|
| 793 |
Dabo-0.1 (2004-05-10): |
|---|
| 794 |
|
|---|
| 795 |
------------------------------------------------------------------------ |
|---|
| 796 |
r262 | paul | 2004-05-11 12:49:07 -0700 (Tue, 11 May 2004) | 2 lines |
|---|
| 797 |
|
|---|
| 798 |
Fix the debug output to now show the property values upon dForm.addControl(). |
|---|
| 799 |
|
|---|
| 800 |
------------------------------------------------------------------------ |
|---|
| 801 |
r261 | paul | 2004-05-10 12:54:38 -0700 (Mon, 10 May 2004) | 2 lines |
|---|
| 802 |
|
|---|
| 803 |
Tag version 0.1 |
|---|
| 804 |
|
|---|
| 805 |
------------------------------------------------------------------------ |
|---|
| 806 |
r260 | paul | 2004-05-10 12:53:57 -0700 (Mon, 10 May 2004) | 2 lines |
|---|
| 807 |
|
|---|
| 808 |
Prep for Dabo-0.1 release. |
|---|
| 809 |
|
|---|
| 810 |
------------------------------------------------------------------------ |
|---|
| 811 |
r259 | paul | 2004-05-07 20:06:34 -0700 (Fri, 07 May 2004) | 4 lines |
|---|
| 812 |
|
|---|
| 813 |
I messed up earlier, intending to move the app name/version stuff to be |
|---|
| 814 |
more accessible, I instead moved it to a point too late in instantiation |
|---|
| 815 |
for the main form to notice. |
|---|
| 816 |
|
|---|
| 817 |
------------------------------------------------------------------------ |
|---|
| 818 |
r258 | paul | 2004-05-07 16:43:43 -0700 (Fri, 07 May 2004) | 2 lines |
|---|
| 819 |
|
|---|
| 820 |
Put the dabo icon on the forms by default. |
|---|
| 821 |
|
|---|
| 822 |
------------------------------------------------------------------------ |
|---|
| 823 |
r257 | paul | 2004-05-07 16:22:53 -0700 (Fri, 07 May 2004) | 5 lines |
|---|
| 824 |
|
|---|
| 825 |
Make column definition items tuples instead of lists, so that they are |
|---|
| 826 |
immutable. dGrid can alter its copy of the columndef for its own use, |
|---|
| 827 |
and when it was a list it was altering the shared copy. Making it |
|---|
| 828 |
immutable forces a pass-by-value instead of pass-by-reference. |
|---|
| 829 |
|
|---|
| 830 |
------------------------------------------------------------------------ |
|---|
| 831 |
r256 | paul | 2004-05-07 16:09:25 -0700 (Fri, 07 May 2004) | 3 lines |
|---|
| 832 |
|
|---|
| 833 |
Change the order of the setting of the appInfo properties, to allow |
|---|
| 834 |
user code to set these properties in dApp.setup(). |
|---|
| 835 |
|
|---|
| 836 |
------------------------------------------------------------------------ |
|---|
| 837 |
r255 | paul | 2004-05-07 15:42:42 -0700 (Fri, 07 May 2004) | 3 lines |
|---|
| 838 |
|
|---|
| 839 |
Fix some long-standing, really funky problems with repositioning and resizing |
|---|
| 840 |
grid columns. It should be way more stable now. |
|---|
| 841 |
|
|---|
| 842 |
------------------------------------------------------------------------ |
|---|
| 843 |
r254 | paul | 2004-05-07 15:31:46 -0700 (Fri, 07 May 2004) | 2 lines |
|---|
| 844 |
|
|---|
| 845 |
This fixes the __setattr__ problem. |
|---|
| 846 |
|
|---|
| 847 |
------------------------------------------------------------------------ |
|---|
| 848 |
r253 | ed | 2004-05-07 12:35:35 -0700 (Fri, 07 May 2004) | 5 lines |
|---|
| 849 |
|
|---|
| 850 |
Corrected a bunch of dumb typos. |
|---|
| 851 |
|
|---|
| 852 |
Note: I have to run out now, but next on the list is to update the demos, |
|---|
| 853 |
etc., to import dException instead of dError. |
|---|
| 854 |
|
|---|
| 855 |
------------------------------------------------------------------------ |
|---|
| 856 |
r252 | ed | 2004-05-07 12:31:14 -0700 (Fri, 07 May 2004) | 2 lines |
|---|
| 857 |
|
|---|
| 858 |
Removed extra parenthesis |
|---|
| 859 |
|
|---|
| 860 |
------------------------------------------------------------------------ |
|---|
| 861 |
r251 | ed | 2004-05-07 12:09:31 -0700 (Fri, 07 May 2004) | 8 lines |
|---|
| 862 |
|
|---|
| 863 |
Changed all of the references to dError to dException to emphasize the |
|---|
| 864 |
deliberate nature of these exceptions. Removed all the 'errorMsg'-related |
|---|
| 865 |
code in the bizobj and cursor classes, as these now raise exception rather |
|---|
| 866 |
than returning False. |
|---|
| 867 |
|
|---|
| 868 |
Modified the beforeXX() methods so that returning any non-empty string |
|---|
| 869 |
raises an exception with that string as the error message of the exception. |
|---|
| 870 |
|
|---|
| 871 |
------------------------------------------------------------------------ |
|---|
| 872 |
r250 | paul | 2004-05-07 11:25:07 -0700 (Fri, 07 May 2004) | 5 lines |
|---|
| 873 |
|
|---|
| 874 |
Change dApp.homeDir from the location where Python was started to the location |
|---|
| 875 |
where the startup script lives. This allows shortcuts to appRecipes/main.py to |
|---|
| 876 |
find the dbConnectionDefs.py, for example. |
|---|
| 877 |
|
|---|
| 878 |
|
|---|
| 879 |
------------------------------------------------------------------------ |
|---|
| 880 |
r249 | paul | 2004-05-06 20:07:20 -0700 (Thu, 06 May 2004) | 2 lines |
|---|
| 881 |
|
|---|
| 882 |
Some mods to ANNOUNCE |
|---|
| 883 |
|
|---|
| 884 |
------------------------------------------------------------------------ |
|---|
| 885 |
r248 | paul | 2004-05-06 14:22:53 -0700 (Thu, 06 May 2004) | 6 lines |
|---|
| 886 |
|
|---|
| 887 |
Fix to the MySQL int/bool problem. This still isn't the correct |
|---|
| 888 |
solution I don't think, but at least it happens where it should: |
|---|
| 889 |
at the cursor level, and only when there is a type mismatch |
|---|
| 890 |
between the old val and the new val. |
|---|
| 891 |
|
|---|
| 892 |
|
|---|
| 893 |
------------------------------------------------------------------------ |
|---|
| 894 |
r247 | ed | 2004-05-06 11:18:51 -0700 (Thu, 06 May 2004) | 3 lines |
|---|
| 895 |
|
|---|
| 896 |
I've edited the original ANNOUNCE, adding some stuff and switching other |
|---|
| 897 |
stuff around. |
|---|
| 898 |
|
|---|
| 899 |
------------------------------------------------------------------------ |
|---|
| 900 |
r246 | paul | 2004-05-05 21:46:02 -0700 (Wed, 05 May 2004) | 4 lines |
|---|
| 901 |
|
|---|
| 902 |
Fix bug in flushValue code: self shouldn't have been prepended |
|---|
| 903 |
to curVal. |
|---|
| 904 |
|
|---|
| 905 |
|
|---|
| 906 |
------------------------------------------------------------------------ |
|---|
| 907 |
r245 | paul | 2004-05-05 16:05:58 -0700 (Wed, 05 May 2004) | 6 lines |
|---|
| 908 |
|
|---|
| 909 |
Modify the property names of dConnectInfo to match the conventions |
|---|
| 910 |
elsewhere in Dabo of capitalized property names. |
|---|
| 911 |
|
|---|
| 912 |
Add a dMessageBox.info() message box. |
|---|
| 913 |
|
|---|
| 914 |
|
|---|
| 915 |
------------------------------------------------------------------------ |
|---|
| 916 |
r244 | paul | 2004-05-04 10:49:55 -0700 (Tue, 04 May 2004) | 15 lines |
|---|
| 917 |
|
|---|
| 918 |
Fix dGrid's checkboxes to reflect the true value, instead of just being |
|---|
| 919 |
checked no matter what. |
|---|
| 920 |
|
|---|
| 921 |
The strict name checking won't work for parentless windows, such as a |
|---|
| 922 |
top-level frame. For now, turn off strict checking for parentless windows, |
|---|
| 923 |
allowing possible duplicate names. |
|---|
| 924 |
|
|---|
| 925 |
Fix the test.py script to use unique object names. |
|---|
| 926 |
|
|---|
| 927 |
Call activeControlValid() when the user leaves a page. This allows, for |
|---|
| 928 |
example, the values in dGrid to reflect the new value without the user |
|---|
| 929 |
having to leave the control first. |
|---|
| 930 |
|
|---|
| 931 |
|
|---|
| 932 |
|
|---|
| 933 |
------------------------------------------------------------------------ |
|---|
| 934 |
r243 | paul | 2004-05-04 09:43:28 -0700 (Tue, 04 May 2004) | 9 lines |
|---|
| 935 |
|
|---|
| 936 |
Add code in dGrid to display boolean values in a checkbox. Fix bug |
|---|
| 937 |
in dGrid which would cause an IndexError when assigning default column |
|---|
| 938 |
widths. |
|---|
| 939 |
|
|---|
| 940 |
Fix dPageDataNav.EditPage to put the caption in the checkbox instead |
|---|
| 941 |
of in the label. |
|---|
| 942 |
|
|---|
| 943 |
|
|---|
| 944 |
|
|---|
| 945 |
------------------------------------------------------------------------ |
|---|
| 946 |
r242 | ed | 2004-05-04 08:59:58 -0700 (Tue, 04 May 2004) | 6 lines |
|---|
| 947 |
|
|---|
| 948 |
When a the flushValue() method was being called to flush changes to a |
|---|
| 949 |
control before a Save was run, the _oldVal property was not being updated. |
|---|
| 950 |
Subsequent calls to the control's flushValue() method would fail if the new |
|---|
| 951 |
value was equal to the original _oldVal. While this would not be common in |
|---|
| 952 |
text fields, it is very common in boolean fields. |
|---|
| 953 |
|
|---|
| 954 |
------------------------------------------------------------------------ |
|---|
| 955 |
r241 | paul | 2004-05-04 06:56:35 -0700 (Tue, 04 May 2004) | 10 lines |
|---|
| 956 |
|
|---|
| 957 |
Add convenience function dBizobj.getChildByDataSource(). |
|---|
| 958 |
|
|---|
| 959 |
Since dPageFrame sets a default number of pages now in __init__, |
|---|
| 960 |
fix dPageFrameDataNav to set this back to zero, so that when |
|---|
| 961 |
pages get added later they are the only pages. |
|---|
| 962 |
|
|---|
| 963 |
Fix dPageDataNav to not expect to get the child bizobj references |
|---|
| 964 |
directly from dForm, since dForm doesn't manage child bizobjs. |
|---|
| 965 |
|
|---|
| 966 |
|
|---|
| 967 |
------------------------------------------------------------------------ |
|---|
| 968 |
r240 | paul | 2004-05-03 19:21:20 -0700 (Mon, 03 May 2004) | 14 lines |
|---|
| 969 |
|
|---|
| 970 |
Add PageClass and PageCount properties to dPageFrame, for specifying |
|---|
| 971 |
the number of pages (new pages will be based on PageClass, allowing |
|---|
| 972 |
the user to override with their own base class). User still has the |
|---|
| 973 |
option to use AddPage() directly. |
|---|
| 974 |
|
|---|
| 975 |
Reworked the setting of the default number of pages... does that work |
|---|
| 976 |
for you, knowing that we aren't encouraging passing values to the |
|---|
| 977 |
constructors? The only drawback to setting a positive number of pages |
|---|
| 978 |
is that user code will have to first set to zero if they want to add |
|---|
| 979 |
their own subclassed pages. |
|---|
| 980 |
|
|---|
| 981 |
Add TabPosition to the list of properties that require recreation. |
|---|
| 982 |
|
|---|
| 983 |
|
|---|
| 984 |
------------------------------------------------------------------------ |
|---|
| 985 |
r239 | paul | 2004-05-03 17:36:32 -0700 (Mon, 03 May 2004) | 25 lines |
|---|
| 986 |
|
|---|
| 987 |
Handle NoRecordsError in dBizobj.getParentPk(). |
|---|
| 988 |
|
|---|
| 989 |
Childviews in dFormDataNav use dGrid in the childview pages just like in |
|---|
| 990 |
the main browse page. Add logic so that when new/edit/delete is selected |
|---|
| 991 |
in the popup menu, it gets directed to the proper place. |
|---|
| 992 |
|
|---|
| 993 |
Raise NameError if user code tries to set a dObject's Name property to |
|---|
| 994 |
a sibling's name. If this happens inside the init phase of the control, the |
|---|
| 995 |
error won't propagate up but the object will get assigned a new name |
|---|
| 996 |
instead. |
|---|
| 997 |
|
|---|
| 998 |
Make control's init's call private methods _beforeInit() and _afterInit() |
|---|
| 999 |
instead of the user-code beforeInit() and afterInit() hooks. This is to |
|---|
| 1000 |
offer a level of guarantee that the basic stuff happens even if the user |
|---|
| 1001 |
forgets to doDefault(). _beforeInit() and _afterInit() now call the user- |
|---|
| 1002 |
code hook methods. |
|---|
| 1003 |
|
|---|
| 1004 |
Add initChildObjects() hook, which is where daboDesigner should put its |
|---|
| 1005 |
addObject() code. Called from dPemMixin._afterInit(). |
|---|
| 1006 |
|
|---|
| 1007 |
Fix dSlider's docstring. |
|---|
| 1008 |
|
|---|
| 1009 |
|
|---|
| 1010 |
|
|---|
| 1011 |
|
|---|
| 1012 |
------------------------------------------------------------------------ |
|---|
| 1013 |
r238 | ed | 2004-05-02 13:01:04 -0700 (Sun, 02 May 2004) | 3 lines |
|---|
| 1014 |
|
|---|
| 1015 |
Added the new TypeID property to the list of props that are hidden in the |
|---|
| 1016 |
designer. |
|---|
| 1017 |
|
|---|
| 1018 |
------------------------------------------------------------------------ |
|---|
| 1019 |
r237 | ed | 2004-05-01 03:36:15 -0700 (Sat, 01 May 2004) | 2 lines |
|---|
| 1020 |
|
|---|
| 1021 |
Er, ah... you might need this file... ;-) |
|---|
| 1022 |
|
|---|
| 1023 |
------------------------------------------------------------------------ |
|---|
| 1024 |
r236 | ed | 2004-04-30 20:31:57 -0700 (Fri, 30 Apr 2004) | 3 lines |
|---|
| 1025 |
|
|---|
| 1026 |
Added dSlider control. |
|---|
| 1027 |
|
|---|
| 1028 |
|
|---|
| 1029 |
------------------------------------------------------------------------ |
|---|
| 1030 |
r235 | paul | 2004-04-30 11:45:42 -0700 (Fri, 30 Apr 2004) | 2 lines |
|---|
| 1031 |
|
|---|
| 1032 |
More info in INSTALL. |
|---|
| 1033 |
|
|---|
| 1034 |
------------------------------------------------------------------------ |
|---|
| 1035 |
r234 | paul | 2004-04-30 10:11:55 -0700 (Fri, 30 Apr 2004) | 3 lines |
|---|
| 1036 |
|
|---|
| 1037 |
When I made the bizobj changes, I inadvertantly set the default value of |
|---|
| 1038 |
RestorePositionOnRequery to False instead of True. |
|---|
| 1039 |
|
|---|
| 1040 |
------------------------------------------------------------------------ |
|---|
| 1041 |
r233 | paul | 2004-04-30 09:30:26 -0700 (Fri, 30 Apr 2004) | 9 lines |
|---|
| 1042 |
|
|---|
| 1043 |
Dabo Announcement Version 0.1, dated 5/1/2004. Please read and augment. I'll send this |
|---|
| 1044 |
to: |
|---|
| 1045 |
|
|---|
| 1046 |
ProFox/ProLinux/ProPython |
|---|
| 1047 |
San Jose VFP SIG |
|---|
| 1048 |
wxPython-users |
|---|
| 1049 |
python-users |
|---|
| 1050 |
|
|---|
| 1051 |
|
|---|
| 1052 |
------------------------------------------------------------------------ |
|---|
| 1053 |
r232 | paul | 2004-04-29 16:23:33 -0700 (Thu, 29 Apr 2004) | 6 lines |
|---|
| 1054 |
|
|---|
| 1055 |
Change docstring style from ''' to """, dabo-wide. |
|---|
| 1056 |
|
|---|
| 1057 |
Make some of the bizobj changes as discussed, but didn't do the RI stuff |
|---|
| 1058 |
as I'm unclear on what, if anything, we've decided to do. |
|---|
| 1059 |
|
|---|
| 1060 |
|
|---|
| 1061 |
------------------------------------------------------------------------ |
|---|
| 1062 |
r231 | paul | 2004-04-29 11:23:57 -0700 (Thu, 29 Apr 2004) | 3 lines |
|---|
| 1063 |
|
|---|
| 1064 |
Add the new dabo icon in various sizes. They will likely get |
|---|
| 1065 |
modified but at least they are there as placeholders. |
|---|
| 1066 |
|
|---|
| 1067 |
------------------------------------------------------------------------ |
|---|
| 1068 |
r230 | paul | 2004-04-29 08:05:34 -0700 (Thu, 29 Apr 2004) | 8 lines |
|---|
| 1069 |
|
|---|
| 1070 |
When I moved dError into its own namespace in dCursorMixin last week, I |
|---|
| 1071 |
neglected to specify the namespace in some places where errors are raised. |
|---|
| 1072 |
Fix that. |
|---|
| 1073 |
|
|---|
| 1074 |
Fix dGrid to call setRowNumber() instead of the now-nonexistent moveToRowNum(). |
|---|
| 1075 |
|
|---|
| 1076 |
Fix a couple bugs in dPageDataNav. |
|---|
| 1077 |
|
|---|
| 1078 |
------------------------------------------------------------------------ |
|---|
| 1079 |
r229 | ed | 2004-04-29 07:13:19 -0700 (Thu, 29 Apr 2004) | 8 lines |
|---|
| 1080 |
|
|---|
| 1081 |
Changed the names of the moveTo* methods to _moveTo* to indicate that they |
|---|
| 1082 |
should not be called directly from outside the bizobj, |
|---|
| 1083 |
|
|---|
| 1084 |
Added the setRowNumber() method, which allows navigation to a particular row |
|---|
| 1085 |
in the result set, with a resultant requeryAllChildren() call. It also has |
|---|
| 1086 |
the standard before- and after- hooks. |
|---|
| 1087 |
|
|---|
| 1088 |
|
|---|
| 1089 |
------------------------------------------------------------------------ |
|---|
| 1090 |
r228 | ed | 2004-04-29 04:48:48 -0700 (Thu, 29 Apr 2004) | 4 lines |
|---|
| 1091 |
|
|---|
| 1092 |
Didn't realize that the SetRange() method of the Gauge control did not |
|---|
| 1093 |
require re-creation, so I removed that property name from the |
|---|
| 1094 |
preInitProperties. |
|---|
| 1095 |
|
|---|
| 1096 |
------------------------------------------------------------------------ |
|---|
| 1097 |
r227 | ed | 2004-04-29 04:42:53 -0700 (Thu, 29 Apr 2004) | 3 lines |
|---|
| 1098 |
|
|---|
| 1099 |
Accidentally restored the wrong line when merging my changes in with the |
|---|
| 1100 |
ones you made yesterday. |
|---|
| 1101 |
|
|---|
| 1102 |
------------------------------------------------------------------------ |
|---|
| 1103 |
r226 | ed | 2004-04-29 04:35:00 -0700 (Thu, 29 Apr 2004) | 26 lines |
|---|
| 1104 |
|
|---|
| 1105 |
Removed the calls to requeryAllChildren() and afterPointerMove() from the |
|---|
| 1106 |
bizobj. Added those calls as an option to the seek() method. |
|---|
| 1107 |
|
|---|
| 1108 |
The first two methods are "for internal use only", and should never be called from |
|---|
| 1109 |
an app. They exist so that the bizobj can move the pointer to where it needs |
|---|
| 1110 |
to be without triggering a slew of additional effects. |
|---|
| 1111 |
|
|---|
| 1112 |
moveToPK() is only used in a requery() to try to restore the record pointer |
|---|
| 1113 |
to the PK of the record it was on before the cursror was requeried. It is |
|---|
| 1114 |
followed by a call to requeryAllChildren() and afterPointerMove() in that |
|---|
| 1115 |
method; calling it again from this one is just inefficient.. |
|---|
| 1116 |
|
|---|
| 1117 |
moveToRowNum() is called by the validate() method so that a bizobj can check |
|---|
| 1118 |
all of its records. You don't want it requerying its children, as they will |
|---|
| 1119 |
need to be validated separately, and will be called in turn. |
|---|
| 1120 |
|
|---|
| 1121 |
In VFP Codebook, these methods are protected. For record pointer movement |
|---|
| 1122 |
from within an app, the public methods first(), next(), etc., should be used |
|---|
| 1123 |
to move the record pointer. |
|---|
| 1124 |
|
|---|
| 1125 |
Since seek() is intended to be called both internally and from developer's |
|---|
| 1126 |
code, I've added a parameter 'runRequery' which defaults to False. If this |
|---|
| 1127 |
value is passed as True, requeryAllChildren() and afterPointerMove() will be |
|---|
| 1128 |
called if the cursor moves the pointer. |
|---|
| 1129 |
|
|---|
| 1130 |
|
|---|
| 1131 |
------------------------------------------------------------------------ |
|---|
| 1132 |
r225 | paul | 2004-04-28 23:38:17 -0700 (Wed, 28 Apr 2004) | 4 lines |
|---|
| 1133 |
|
|---|
| 1134 |
Make dGauge not data-aware, and fix range and value to work correctly. |
|---|
| 1135 |
BackColor and ForeColor don't seem to work, neither does BorderStyle. |
|---|
| 1136 |
|
|---|
| 1137 |
|
|---|
| 1138 |
------------------------------------------------------------------------ |
|---|
| 1139 |
r224 | paul | 2004-04-28 23:18:00 -0700 (Wed, 28 Apr 2004) | 2 lines |
|---|
| 1140 |
|
|---|
| 1141 |
Child view pages now show data browse grid. |
|---|
| 1142 |
|
|---|
| 1143 |
------------------------------------------------------------------------ |
|---|
| 1144 |
r223 | paul | 2004-04-28 16:22:00 -0700 (Wed, 28 Apr 2004) | 2 lines |
|---|
| 1145 |
|
|---|
| 1146 |
Further work on child views for the dFormDataNav thing. |
|---|
| 1147 |
|
|---|
| 1148 |
------------------------------------------------------------------------ |
|---|
| 1149 |
r222 | ed | 2004-04-28 13:36:41 -0700 (Wed, 28 Apr 2004) | 5 lines |
|---|
| 1150 |
|
|---|
| 1151 |
Added the Gauge control. It's generally working (although there are some |
|---|
| 1152 |
funky background changes when being reCreated), but I haven't been able to |
|---|
| 1153 |
get the ability to change the Range of the control at design time. Guess I |
|---|
| 1154 |
need to grok the whole preInit stuff better. |
|---|
| 1155 |
|
|---|
| 1156 |
------------------------------------------------------------------------ |
|---|
| 1157 |
r221 | paul | 2004-04-28 13:11:48 -0700 (Wed, 28 Apr 2004) | 50 lines |
|---|
| 1158 |
|
|---|
| 1159 |
Refactor the API of dBizobj, making most of the 'properties' into actual |
|---|
| 1160 |
Python properties complete with getters, setters, and docstrings. Here is |
|---|
| 1161 |
a list of the new bizobj properties: |
|---|
| 1162 |
|
|---|
| 1163 |
Caption (new: friendly name for communicating with the user) |
|---|
| 1164 |
DataSource (was dataSource) |
|---|
| 1165 |
SQL (was sql) |
|---|
| 1166 |
RequeryOnLoad (was noDataOnLoad) |
|---|
| 1167 |
AutoPopulatePK (was autoPopulatePK) |
|---|
| 1168 |
Parent (was _parent) |
|---|
| 1169 |
KeyField (was keyField) |
|---|
| 1170 |
LinkField (was linkField) |
|---|
| 1171 |
ErrorMessage (was _errorMsg, and I think this one can go because of the exception-refactor) |
|---|
| 1172 |
RequeryChildOnSave (was requeryChildOnSave) |
|---|
| 1173 |
NewChildOnNew (was newChildOnNew) |
|---|
| 1174 |
NewRecordOnNewParent (was newRecordOnNewParent) |
|---|
| 1175 |
FillLinkFromParent (was fillLinkFromParent) |
|---|
| 1176 |
RestorePositionOnRequery (was savePosOnRequery) |
|---|
| 1177 |
|
|---|
| 1178 |
Obviously, I've FUBAR'd the original API so all the demos that use bizobj's |
|---|
| 1179 |
will have to be changed, which I'll do after lunch. |
|---|
| 1180 |
|
|---|
| 1181 |
Refactor getPropertyList() and getPropertyInfo() out of dPemMixin and into the |
|---|
| 1182 |
new dabo.common.PropertyHelperMixin, since these functions can be useful at a |
|---|
| 1183 |
lower level than our wx interface. Make dPemMixin and dBizobj inherit from |
|---|
| 1184 |
PropertyHelperMixin, which means that dBizobj can now theoretically be represented |
|---|
| 1185 |
on the designer and have its properties edited there. |
|---|
| 1186 |
|
|---|
| 1187 |
Add beforeInit() hook to dBizobj, which allows the user code an opportunity to |
|---|
| 1188 |
modify properties such as RequeryOnLoad before they take effect. |
|---|
| 1189 |
|
|---|
| 1190 |
dBizobj.__setattr__ had old-style class code that was causing my new property API |
|---|
| 1191 |
to fail silently, and it drove me crazy for an entire hour at least. :) Changing |
|---|
| 1192 |
to the new-style super() call for non-cursor field attributes fixed the problem. |
|---|
| 1193 |
Lesson learned: __getattr__ will be called only after the attribute was not found, |
|---|
| 1194 |
while __setattr__ gets called before Python looks for the attribute at all. Sounds |
|---|
| 1195 |
like a subtle difference on paper but the implications are huge! |
|---|
| 1196 |
|
|---|
| 1197 |
Add method getChildren() to dBizobj, which returns a tuple of object references |
|---|
| 1198 |
to the children. |
|---|
| 1199 |
|
|---|
| 1200 |
Add icon childview.png, which represents a child bizobj in the runtime dFormDataNav. |
|---|
| 1201 |
|
|---|
| 1202 |
In dFormDataNav, delay instantiation of the pageframe until the primary column def |
|---|
| 1203 |
has been assigned, which allows the childviews to appear in the nav menu and in the |
|---|
| 1204 |
page frame. |
|---|
| 1205 |
|
|---|
| 1206 |
The UI for the child view stuff isn't working yet, but it i |
|---|