| | 1 | Dabo-0.1: |
|---|
| | 2 | |
|---|
| | 3 | ------------------------------------------------------------------------ |
|---|
| | 4 | r259 | paul | 2004-05-07 20:06:34 -0700 (Fri, 07 May 2004) | 4 lines |
|---|
| | 5 | |
|---|
| | 6 | I messed up earlier, intending to move the app name/version stuff to be |
|---|
| | 7 | more accessible, I instead moved it to a point too late in instantiation |
|---|
| | 8 | for the main form to notice. |
|---|
| | 9 | |
|---|
| | 10 | ------------------------------------------------------------------------ |
|---|
| | 11 | r258 | paul | 2004-05-07 16:43:43 -0700 (Fri, 07 May 2004) | 2 lines |
|---|
| | 12 | |
|---|
| | 13 | Put the dabo icon on the forms by default. |
|---|
| | 14 | |
|---|
| | 15 | ------------------------------------------------------------------------ |
|---|
| | 16 | r257 | paul | 2004-05-07 16:22:53 -0700 (Fri, 07 May 2004) | 5 lines |
|---|
| | 17 | |
|---|
| | 18 | Make column definition items tuples instead of lists, so that they are |
|---|
| | 19 | immutable. dGrid can alter its copy of the columndef for its own use, |
|---|
| | 20 | and when it was a list it was altering the shared copy. Making it |
|---|
| | 21 | immutable forces a pass-by-value instead of pass-by-reference. |
|---|
| | 22 | |
|---|
| | 23 | ------------------------------------------------------------------------ |
|---|
| | 24 | r256 | paul | 2004-05-07 16:09:25 -0700 (Fri, 07 May 2004) | 3 lines |
|---|
| | 25 | |
|---|
| | 26 | Change the order of the setting of the appInfo properties, to allow |
|---|
| | 27 | user code to set these properties in dApp.setup(). |
|---|
| | 28 | |
|---|
| | 29 | ------------------------------------------------------------------------ |
|---|
| | 30 | r255 | paul | 2004-05-07 15:42:42 -0700 (Fri, 07 May 2004) | 3 lines |
|---|
| | 31 | |
|---|
| | 32 | Fix some long-standing, really funky problems with repositioning and resizing |
|---|
| | 33 | grid columns. It should be way more stable now. |
|---|
| | 34 | |
|---|
| | 35 | ------------------------------------------------------------------------ |
|---|
| | 36 | r254 | paul | 2004-05-07 15:31:46 -0700 (Fri, 07 May 2004) | 2 lines |
|---|
| | 37 | |
|---|
| | 38 | This fixes the __setattr__ problem. |
|---|
| | 39 | |
|---|
| | 40 | ------------------------------------------------------------------------ |
|---|
| | 41 | r253 | ed | 2004-05-07 12:35:35 -0700 (Fri, 07 May 2004) | 5 lines |
|---|
| | 42 | |
|---|
| | 43 | Corrected a bunch of dumb typos. |
|---|
| | 44 | |
|---|
| | 45 | Note: I have to run out now, but next on the list is to update the demos, |
|---|
| | 46 | etc., to import dException instead of dError. |
|---|
| | 47 | |
|---|
| | 48 | ------------------------------------------------------------------------ |
|---|
| | 49 | r252 | ed | 2004-05-07 12:31:14 -0700 (Fri, 07 May 2004) | 2 lines |
|---|
| | 50 | |
|---|
| | 51 | Removed extra parenthesis |
|---|
| | 52 | |
|---|
| | 53 | ------------------------------------------------------------------------ |
|---|
| | 54 | r251 | ed | 2004-05-07 12:09:31 -0700 (Fri, 07 May 2004) | 8 lines |
|---|
| | 55 | |
|---|
| | 56 | Changed all of the references to dError to dException to emphasize the |
|---|
| | 57 | deliberate nature of these exceptions. Removed all the 'errorMsg'-related |
|---|
| | 58 | code in the bizobj and cursor classes, as these now raise exception rather |
|---|
| | 59 | than returning False. |
|---|
| | 60 | |
|---|
| | 61 | Modified the beforeXX() methods so that returning any non-empty string |
|---|
| | 62 | raises an exception with that string as the error message of the exception. |
|---|
| | 63 | |
|---|
| | 64 | ------------------------------------------------------------------------ |
|---|
| | 65 | r250 | paul | 2004-05-07 11:25:07 -0700 (Fri, 07 May 2004) | 5 lines |
|---|
| | 66 | |
|---|
| | 67 | Change dApp.homeDir from the location where Python was started to the location |
|---|
| | 68 | where the startup script lives. This allows shortcuts to appRecipes/main.py to |
|---|
| | 69 | find the dbConnectionDefs.py, for example. |
|---|
| | 70 | |
|---|
| | 71 | |
|---|
| | 72 | ------------------------------------------------------------------------ |
|---|
| | 73 | r249 | paul | 2004-05-06 20:07:20 -0700 (Thu, 06 May 2004) | 2 lines |
|---|
| | 74 | |
|---|
| | 75 | Some mods to ANNOUNCE |
|---|
| | 76 | |
|---|
| | 77 | ------------------------------------------------------------------------ |
|---|
| | 78 | r248 | paul | 2004-05-06 14:22:53 -0700 (Thu, 06 May 2004) | 6 lines |
|---|
| | 79 | |
|---|
| | 80 | Fix to the MySQL int/bool problem. This still isn't the correct |
|---|
| | 81 | solution I don't think, but at least it happens where it should: |
|---|
| | 82 | at the cursor level, and only when there is a type mismatch |
|---|
| | 83 | between the old val and the new val. |
|---|
| | 84 | |
|---|
| | 85 | |
|---|
| | 86 | ------------------------------------------------------------------------ |
|---|
| | 87 | r247 | ed | 2004-05-06 11:18:51 -0700 (Thu, 06 May 2004) | 3 lines |
|---|
| | 88 | |
|---|
| | 89 | I've edited the original ANNOUNCE, adding some stuff and switching other |
|---|
| | 90 | stuff around. |
|---|
| | 91 | |
|---|
| | 92 | ------------------------------------------------------------------------ |
|---|
| | 93 | r246 | paul | 2004-05-05 21:46:02 -0700 (Wed, 05 May 2004) | 4 lines |
|---|
| | 94 | |
|---|
| | 95 | Fix bug in flushValue code: self shouldn't have been prepended |
|---|
| | 96 | to curVal. |
|---|
| | 97 | |
|---|
| | 98 | |
|---|
| | 99 | ------------------------------------------------------------------------ |
|---|
| | 100 | r245 | paul | 2004-05-05 16:05:58 -0700 (Wed, 05 May 2004) | 6 lines |
|---|
| | 101 | |
|---|
| | 102 | Modify the property names of dConnectInfo to match the conventions |
|---|
| | 103 | elsewhere in Dabo of capitalized property names. |
|---|
| | 104 | |
|---|
| | 105 | Add a dMessageBox.info() message box. |
|---|
| | 106 | |
|---|
| | 107 | |
|---|
| | 108 | ------------------------------------------------------------------------ |
|---|
| | 109 | r244 | paul | 2004-05-04 10:49:55 -0700 (Tue, 04 May 2004) | 15 lines |
|---|
| | 110 | |
|---|
| | 111 | Fix dGrid's checkboxes to reflect the true value, instead of just being |
|---|
| | 112 | checked no matter what. |
|---|
| | 113 | |
|---|
| | 114 | The strict name checking won't work for parentless windows, such as a |
|---|
| | 115 | top-level frame. For now, turn off strict checking for parentless windows, |
|---|
| | 116 | allowing possible duplicate names. |
|---|
| | 117 | |
|---|
| | 118 | Fix the test.py script to use unique object names. |
|---|
| | 119 | |
|---|
| | 120 | Call activeControlValid() when the user leaves a page. This allows, for |
|---|
| | 121 | example, the values in dGrid to reflect the new value without the user |
|---|
| | 122 | having to leave the control first. |
|---|
| | 123 | |
|---|
| | 124 | |
|---|
| | 125 | |
|---|
| | 126 | ------------------------------------------------------------------------ |
|---|
| | 127 | r243 | paul | 2004-05-04 09:43:28 -0700 (Tue, 04 May 2004) | 9 lines |
|---|
| | 128 | |
|---|
| | 129 | Add code in dGrid to display boolean values in a checkbox. Fix bug |
|---|
| | 130 | in dGrid which would cause an IndexError when assigning default column |
|---|
| | 131 | widths. |
|---|
| | 132 | |
|---|
| | 133 | Fix dPageDataNav.EditPage to put the caption in the checkbox instead |
|---|
| | 134 | of in the label. |
|---|
| | 135 | |
|---|
| | 136 | |
|---|
| | 137 | |
|---|
| | 138 | ------------------------------------------------------------------------ |
|---|
| | 139 | r242 | ed | 2004-05-04 08:59:58 -0700 (Tue, 04 May 2004) | 6 lines |
|---|
| | 140 | |
|---|
| | 141 | When a the flushValue() method was being called to flush changes to a |
|---|
| | 142 | control before a Save was run, the _oldVal property was not being updated. |
|---|
| | 143 | Subsequent calls to the control's flushValue() method would fail if the new |
|---|
| | 144 | value was equal to the original _oldVal. While this would not be common in |
|---|
| | 145 | text fields, it is very common in boolean fields. |
|---|
| | 146 | |
|---|
| | 147 | ------------------------------------------------------------------------ |
|---|
| | 148 | r241 | paul | 2004-05-04 06:56:35 -0700 (Tue, 04 May 2004) | 10 lines |
|---|
| | 149 | |
|---|
| | 150 | Add convenience function dBizobj.getChildByDataSource(). |
|---|
| | 151 | |
|---|
| | 152 | Since dPageFrame sets a default number of pages now in __init__, |
|---|
| | 153 | fix dPageFrameDataNav to set this back to zero, so that when |
|---|
| | 154 | pages get added later they are the only pages. |
|---|
| | 155 | |
|---|
| | 156 | Fix dPageDataNav to not expect to get the child bizobj references |
|---|
| | 157 | directly from dForm, since dForm doesn't manage child bizobjs. |
|---|
| | 158 | |
|---|
| | 159 | |
|---|
| | 160 | ------------------------------------------------------------------------ |
|---|
| | 161 | r240 | paul | 2004-05-03 19:21:20 -0700 (Mon, 03 May 2004) | 14 lines |
|---|
| | 162 | |
|---|
| | 163 | Add PageClass and PageCount properties to dPageFrame, for specifying |
|---|
| | 164 | the number of pages (new pages will be based on PageClass, allowing |
|---|
| | 165 | the user to override with their own base class). User still has the |
|---|
| | 166 | option to use AddPage() directly. |
|---|
| | 167 | |
|---|
| | 168 | Reworked the setting of the default number of pages... does that work |
|---|
| | 169 | for you, knowing that we aren't encouraging passing values to the |
|---|
| | 170 | constructors? The only drawback to setting a positive number of pages |
|---|
| | 171 | is that user code will have to first set to zero if they want to add |
|---|
| | 172 | their own subclassed pages. |
|---|
| | 173 | |
|---|
| | 174 | Add TabPosition to the list of properties that require recreation. |
|---|
| | 175 | |
|---|
| | 176 | |
|---|
| | 177 | ------------------------------------------------------------------------ |
|---|
| | 178 | r239 | paul | 2004-05-03 17:36:32 -0700 (Mon, 03 May 2004) | 25 lines |
|---|
| | 179 | |
|---|
| | 180 | Handle NoRecordsError in dBizobj.getParentPk(). |
|---|
| | 181 | |
|---|
| | 182 | Childviews in dFormDataNav use dGrid in the childview pages just like in |
|---|
| | 183 | the main browse page. Add logic so that when new/edit/delete is selected |
|---|
| | 184 | in the popup menu, it gets directed to the proper place. |
|---|
| | 185 | |
|---|
| | 186 | Raise NameError if user code tries to set a dObject's Name property to |
|---|
| | 187 | a sibling's name. If this happens inside the init phase of the control, the |
|---|
| | 188 | error won't propagate up but the object will get assigned a new name |
|---|
| | 189 | instead. |
|---|
| | 190 | |
|---|
| | 191 | Make control's init's call private methods _beforeInit() and _afterInit() |
|---|
| | 192 | instead of the user-code beforeInit() and afterInit() hooks. This is to |
|---|
| | 193 | offer a level of guarantee that the basic stuff happens even if the user |
|---|
| | 194 | forgets to doDefault(). _beforeInit() and _afterInit() now call the user- |
|---|
| | 195 | code hook methods. |
|---|
| | 196 | |
|---|
| | 197 | Add initChildObjects() hook, which is where daboDesigner should put its |
|---|
| | 198 | addObject() code. Called from dPemMixin._afterInit(). |
|---|
| | 199 | |
|---|
| | 200 | Fix dSlider's docstring. |
|---|
| | 201 | |
|---|
| | 202 | |
|---|
| | 203 | |
|---|
| | 204 | |
|---|
| | 205 | ------------------------------------------------------------------------ |
|---|
| | 206 | r238 | ed | 2004-05-02 13:01:04 -0700 (Sun, 02 May 2004) | 3 lines |
|---|
| | 207 | |
|---|
| | 208 | Added the new TypeID property to the list of props that are hidden in the |
|---|
| | 209 | designer. |
|---|
| | 210 | |
|---|
| | 211 | ------------------------------------------------------------------------ |
|---|
| | 212 | r237 | ed | 2004-05-01 03:36:15 -0700 (Sat, 01 May 2004) | 2 lines |
|---|
| | 213 | |
|---|
| | 214 | Er, ah... you might need this file... ;-) |
|---|
| | 215 | |
|---|
| | 216 | ------------------------------------------------------------------------ |
|---|
| | 217 | r236 | ed | 2004-04-30 20:31:57 -0700 (Fri, 30 Apr 2004) | 3 lines |
|---|
| | 218 | |
|---|
| | 219 | Added dSlider control. |
|---|
| | 220 | |
|---|
| | 221 | |
|---|
| | 222 | ------------------------------------------------------------------------ |
|---|
| | 223 | r235 | paul | 2004-04-30 11:45:42 -0700 (Fri, 30 Apr 2004) | 2 lines |
|---|
| | 224 | |
|---|
| | 225 | More info in INSTALL. |
|---|
| | 226 | |
|---|
| | 227 | ------------------------------------------------------------------------ |
|---|
| | 228 | r234 | paul | 2004-04-30 10:11:55 -0700 (Fri, 30 Apr 2004) | 3 lines |
|---|
| | 229 | |
|---|
| | 230 | When I made the bizobj changes, I inadvertantly set the default value of |
|---|
| | 231 | RestorePositionOnRequery to False instead of True. |
|---|
| | 232 | |
|---|
| | 233 | ------------------------------------------------------------------------ |
|---|
| | 234 | r233 | paul | 2004-04-30 09:30:26 -0700 (Fri, 30 Apr 2004) | 9 lines |
|---|
| | 235 | |
|---|
| | 236 | Dabo Announcement Version 0.1, dated 5/1/2004. Please read and augment. I'll send this |
|---|
| | 237 | to: |
|---|
| | 238 | |
|---|
| | 239 | ProFox/ProLinux/ProPython |
|---|
| | 240 | San Jose VFP SIG |
|---|
| | 241 | wxPython-users |
|---|
| | 242 | python-users |
|---|
| | 243 | |
|---|
| | 244 | |
|---|
| | 245 | ------------------------------------------------------------------------ |
|---|
| | 246 | r232 | paul | 2004-04-29 16:23:33 -0700 (Thu, 29 Apr 2004) | 6 lines |
|---|
| | 247 | |
|---|
| | 248 | Change docstring style from ''' to """, dabo-wide. |
|---|
| | 249 | |
|---|
| | 250 | Make some of the bizobj changes as discussed, but didn't do the RI stuff |
|---|
| | 251 | as I'm unclear on what, if anything, we've decided to do. |
|---|
| | 252 | |
|---|
| | 253 | |
|---|
| | 254 | ------------------------------------------------------------------------ |
|---|
| | 255 | r231 | paul | 2004-04-29 11:23:57 -0700 (Thu, 29 Apr 2004) | 3 lines |
|---|
| | 256 | |
|---|
| | 257 | Add the new dabo icon in various sizes. They will likely get |
|---|
| | 258 | modified but at least they are there as placeholders. |
|---|
| | 259 | |
|---|
| | 260 | ------------------------------------------------------------------------ |
|---|
| | 261 | r230 | paul | 2004-04-29 08:05:34 -0700 (Thu, 29 Apr 2004) | 8 lines |
|---|
| | 262 | |
|---|
| | 263 | When I moved dError into its own namespace in dCursorMixin last week, I |
|---|
| | 264 | neglected to specify the namespace in some places where errors are raised. |
|---|
| | 265 | Fix that. |
|---|
| | 266 | |
|---|
| | 267 | Fix dGrid to call setRowNumber() instead of the now-nonexistent moveToRowNum(). |
|---|
| | 268 | |
|---|
| | 269 | Fix a couple bugs in dPageDataNav. |
|---|
| | 270 | |
|---|
| | 271 | ------------------------------------------------------------------------ |
|---|
| | 272 | r229 | ed | 2004-04-29 07:13:19 -0700 (Thu, 29 Apr 2004) | 8 lines |
|---|
| | 273 | |
|---|
| | 274 | Changed the names of the moveTo* methods to _moveTo* to indicate that they |
|---|
| | 275 | should not be called directly from outside the bizobj, |
|---|
| | 276 | |
|---|
| | 277 | Added the setRowNumber() method, which allows navigation to a particular row |
|---|
| | 278 | in the result set, with a resultant requeryAllChildren() call. It also has |
|---|
| | 279 | the standard before- and after- hooks. |
|---|
| | 280 | |
|---|
| | 281 | |
|---|
| | 282 | ------------------------------------------------------------------------ |
|---|
| | 283 | r228 | ed | 2004-04-29 04:48:48 -0700 (Thu, 29 Apr 2004) | 4 lines |
|---|
| | 284 | |
|---|
| | 285 | Didn't realize that the SetRange() method of the Gauge control did not |
|---|
| | 286 | require re-creation, so I removed that property name from the |
|---|
| | 287 | preInitProperties. |
|---|
| | 288 | |
|---|
| | 289 | ------------------------------------------------------------------------ |
|---|
| | 290 | r227 | ed | 2004-04-29 04:42:53 -0700 (Thu, 29 Apr 2004) | 3 lines |
|---|
| | 291 | |
|---|
| | 292 | Accidentally restored the wrong line when merging my changes in with the |
|---|
| | 293 | ones you made yesterday. |
|---|
| | 294 | |
|---|
| | 295 | ------------------------------------------------------------------------ |
|---|
| | 296 | r226 | ed | 2004-04-29 04:35:00 -0700 (Thu, 29 Apr 2004) | 26 lines |
|---|
| | 297 | |
|---|
| | 298 | Removed the calls to requeryAllChildren() and afterPointerMove() from the |
|---|
| | 299 | bizobj. Added those calls as an option to the seek() method. |
|---|
| | 300 | |
|---|
| | 301 | The first two methods are "for internal use only", and should never be called from |
|---|
| | 302 | an app. They exist so that the bizobj can move the pointer to where it needs |
|---|
| | 303 | to be without triggering a slew of additional effects. |
|---|
| | 304 | |
|---|
| | 305 | moveToPK() is only used in a requery() to try to restore the record pointer |
|---|
| | 306 | to the PK of the record it was on before the cursror was requeried. It is |
|---|
| | 307 | followed by a call to requeryAllChildren() and afterPointerMove() in that |
|---|
| | 308 | method; calling it again from this one is just inefficient.. |
|---|
| | 309 | |
|---|
| | 310 | moveToRowNum() is called by the validate() method so that a bizobj can check |
|---|
| | 311 | all of its records. You don't want it requerying its children, as they will |
|---|
| | 312 | need to be validated separately, and will be called in turn. |
|---|
| | 313 | |
|---|
| | 314 | In VFP Codebook, these methods are protected. For record pointer movement |
|---|
| | 315 | from within an app, the public methods first(), next(), etc., should be used |
|---|
| | 316 | to move the record pointer. |
|---|
| | 317 | |
|---|
| | 318 | Since seek() is intended to be called both internally and from developer's |
|---|
| | 319 | code, I've added a parameter 'runRequery' which defaults to False. If this |
|---|
| | 320 | value is passed as True, requeryAllChildren() and afterPointerMove() will be |
|---|
| | 321 | called if the cursor moves the pointer. |
|---|
| | 322 | |
|---|
| | 323 | |
|---|
| | 324 | ------------------------------------------------------------------------ |
|---|
| | 325 | r225 | paul | 2004-04-28 23:38:17 -0700 (Wed, 28 Apr 2004) | 4 lines |
|---|
| | 326 | |
|---|
| | 327 | Make dGauge not data-aware, and fix range and value to work correctly. |
|---|
| | 328 | BackColor and ForeColor don't seem to work, neither does BorderStyle. |
|---|
| | 329 | |
|---|
| | 330 | |
|---|
| | 331 | ------------------------------------------------------------------------ |
|---|
| | 332 | r224 | paul | 2004-04-28 23:18:00 -0700 (Wed, 28 Apr 2004) | 2 lines |
|---|
| | 333 | |
|---|
| | 334 | Child view pages now show data browse grid. |
|---|
| | 335 | |
|---|
| | 336 | ------------------------------------------------------------------------ |
|---|
| | 337 | r223 | paul | 2004-04-28 16:22:00 -0700 (Wed, 28 Apr 2004) | 2 lines |
|---|
| | 338 | |
|---|
| | 339 | Further work on child views for the dFormDataNav thing. |
|---|
| | 340 | |
|---|
| | 341 | ------------------------------------------------------------------------ |
|---|
| | 342 | r222 | ed | 2004-04-28 13:36:41 -0700 (Wed, 28 Apr 2004) | 5 lines |
|---|
| | 343 | |
|---|
| | 344 | Added the Gauge control. It's generally working (although there are some |
|---|
| | 345 | funky background changes when being reCreated), but I haven't been able to |
|---|
| | 346 | get the ability to change the Range of the control at design time. Guess I |
|---|
| | 347 | need to grok the whole preInit stuff better. |
|---|
| | 348 | |
|---|
| | 349 | ------------------------------------------------------------------------ |
|---|
| | 350 | r221 | paul | 2004-04-28 13:11:48 -0700 (Wed, 28 Apr 2004) | 50 lines |
|---|
| | 351 | |
|---|
| | 352 | Refactor the API of dBizobj, making most of the 'properties' into actual |
|---|
| | 353 | Python properties complete with getters, setters, and docstrings. Here is |
|---|
| | 354 | a list of the new bizobj properties: |
|---|
| | 355 | |
|---|
| | 356 | Caption (new: friendly name for communicating with the user) |
|---|
| | 357 | DataSource (was dataSource) |
|---|
| | 358 | SQL (was sql) |
|---|
| | 359 | RequeryOnLoad (was noDataOnLoad) |
|---|
| | 360 | AutoPopulatePK (was autoPopulatePK) |
|---|
| | 361 | Parent (was _parent) |
|---|
| | 362 | KeyField (was keyField) |
|---|
| | 363 | LinkField (was linkField) |
|---|
| | 364 | ErrorMessage (was _errorMsg, and I think this one can go because of the exception-refactor) |
|---|
| | 365 | RequeryChildOnSave (was requeryChildOnSave) |
|---|
| | 366 | NewChildOnNew (was newChildOnNew) |
|---|
| | 367 | NewRecordOnNewParent (was newRecordOnNewParent) |
|---|
| | 368 | FillLinkFromParent (was fillLinkFromParent) |
|---|
| | 369 | RestorePositionOnRequery (was savePosOnRequery) |
|---|
| | 370 | |
|---|
| | 371 | Obviously, I've FUBAR'd the original API so all the demos that use bizobj's |
|---|
| | 372 | will have to be changed, which I'll do after lunch. |
|---|
| | 373 | |
|---|
| | 374 | Refactor getPropertyList() and getPropertyInfo() out of dPemMixin and into the |
|---|
| | 375 | new dabo.common.PropertyHelperMixin, since these functions can be useful at a |
|---|
| | 376 | lower level than our wx interface. Make dPemMixin and dBizobj inherit from |
|---|
| | 377 | PropertyHelperMixin, which means that dBizobj can now theoretically be represented |
|---|
| | 378 | on the designer and have its properties edited there. |
|---|
| | 379 | |
|---|
| | 380 | Add beforeInit() hook to dBizobj, which allows the user code an opportunity to |
|---|
| | 381 | modify properties such as RequeryOnLoad before they take effect. |
|---|
| | 382 | |
|---|
| | 383 | dBizobj.__setattr__ had old-style class code that was causing my new property API |
|---|
| | 384 | to fail silently, and it drove me crazy for an entire hour at least. :) Changing |
|---|
| | 385 | to the new-style super() call for non-cursor field attributes fixed the problem. |
|---|
| | 386 | Lesson learned: __getattr__ will be called only after the attribute was not found, |
|---|
| | 387 | while __setattr__ gets called before Python looks for the attribute at all. Sounds |
|---|
| | 388 | like a subtle difference on paper but the implications are huge! |
|---|
| | 389 | |
|---|
| | 390 | Add method getChildren() to dBizobj, which returns a tuple of object references |
|---|
| | 391 | to the children. |
|---|
| | 392 | |
|---|
| | 393 | Add icon childview.png, which represents a child bizobj in the runtime dFormDataNav. |
|---|
| | 394 | |
|---|
| | 395 | In dFormDataNav, delay instantiation of the pageframe until the primary column def |
|---|
| | 396 | has been assigned, which allows the childviews to appear in the nav menu and in the |
|---|
| | 397 | page frame. |
|---|
| | 398 | |
|---|
| | 399 | The UI for the child view stuff isn't working yet, but it is a little closer. I started |
|---|
| | 400 | out this morning working on that and got sidetracked with the bizobj changes. |
|---|
| | 401 | |
|---|
| | 402 | ------------------------------------------------------------------------ |
|---|
| | 403 | r220 | paul | 2004-04-28 08:42:09 -0700 (Wed, 28 Apr 2004) | 10 lines |
|---|
| | 404 | |
|---|
| | 405 | Make changes to BackColor do an implicit self.Refresh(), as it appears to |
|---|
| | 406 | be necessary with most controls, although it appears that dEditBox needs to |
|---|
| | 407 | actually be recreated... |
|---|
| | 408 | |
|---|
| | 409 | The borderstyle thing isn't working right, as different controls have different |
|---|
| | 410 | default borders. For instance, dEditBox with no border style flags set has a |
|---|
| | 411 | simple border, while dPanel does not. Add a 'Default' setting to let the value |
|---|
| | 412 | get set back to that control's default (no border flags set). |
|---|
| | 413 | |
|---|
| | 414 | |
|---|
| | 415 | ------------------------------------------------------------------------ |
|---|
| | 416 | r219 | paul | 2004-04-28 08:10:24 -0700 (Wed, 28 Apr 2004) | 4 lines |
|---|
| | 417 | |
|---|
| | 418 | Fix bug in dCheckbox where setting alignment back to Left would raise |
|---|
| | 419 | a ValueError. |
|---|
| | 420 | |
|---|
| | 421 | |
|---|
| | 422 | ------------------------------------------------------------------------ |
|---|
| | 423 | r218 | ed | 2004-04-28 04:23:43 -0700 (Wed, 28 Apr 2004) | 3 lines |
|---|
| | 424 | |
|---|
| | 425 | Refactored out the prop/val saving and prop/val restoring sections of |
|---|
| | 426 | reCreate so that they could be called from other places. |
|---|
| | 427 | |
|---|
| | 428 | ------------------------------------------------------------------------ |
|---|
| | 429 | r217 | paul | 2004-04-27 17:21:34 -0700 (Tue, 27 Apr 2004) | 25 lines |
|---|
| | 430 | |
|---|
| | 431 | Import dError into separate namespace, instead of into global namespace, |
|---|
| | 432 | in dBizobj and dCursorMixin. |
|---|
| | 433 | |
|---|
| | 434 | Make dBizobj inherit from DoDefaultMixin. Add an afterInit() hook in |
|---|
| | 435 | dBizobj so that subclasses don't need to know what to send to __init__(). |
|---|
| | 436 | |
|---|
| | 437 | In dBizobj, there were lots of structures like: |
|---|
| | 438 | try: |
|---|
| | 439 | self._cursor.first() |
|---|
| | 440 | self.requeryAllChildren() |
|---|
| | 441 | except dError, e: |
|---|
| | 442 | # Pass the error back to the UI |
|---|
| | 443 | raise dError, e |
|---|
| | 444 | return False |
|---|
| | 445 | |
|---|
| | 446 | Since nothing else is being done except re-raising the error, I simplified |
|---|
| | 447 | these by taking out the try block completely. The error will propagate back |
|---|
| | 448 | to the UI by default anyway. |
|---|
| | 449 | |
|---|
| | 450 | Fix bug in dBizobj: moveToRowNum() and moveToPK() were not requerying the |
|---|
| | 451 | child bizobjs nor calling the afterPointerMove() hook. |
|---|
| | 452 | |
|---|
| | 453 | Put a couple try blocks in dGrid and dDataControlMixin. |
|---|
| | 454 | |
|---|
| | 455 | |
|---|
| | 456 | ------------------------------------------------------------------------ |
|---|
| | 457 | r216 | paul | 2004-04-27 13:00:11 -0700 (Tue, 27 Apr 2004) | 3 lines |
|---|
| | 458 | |
|---|
| | 459 | Text of GPL to COPYING. Addition of LICENSE.TXT which specifies copyright |
|---|
| | 460 | and license. |
|---|
| | 461 | |
|---|
| | 462 | ------------------------------------------------------------------------ |
|---|
| | 463 | r215 | ed | 2004-04-26 17:58:00 -0700 (Mon, 26 Apr 2004) | 3 lines |
|---|
| | 464 | |
|---|
| | 465 | Changed the setSQL() method so that passing no argument results in the same |
|---|
| | 466 | thing as calling biz.setSQL(biz.getSQL()). |
|---|
| | 467 | |
|---|
| | 468 | ------------------------------------------------------------------------ |
|---|
| | 469 | r214 | ed | 2004-04-26 15:45:11 -0700 (Mon, 26 Apr 2004) | 2 lines |
|---|
| | 470 | |
|---|
| | 471 | Cleaned up the copying of ToolTipText. |
|---|
| | 472 | |
|---|
| | 473 | ------------------------------------------------------------------------ |
|---|
| | 474 | r213 | ed | 2004-04-26 13:35:27 -0700 (Mon, 26 Apr 2004) | 4 lines |
|---|
| | 475 | |
|---|
| | 476 | Added a list of properties to ignore. These are properties that are either |
|---|
| | 477 | calculated props, such as 'Right', or properties that cannot be set, such as |
|---|
| | 478 | 'BaseClass'. |
|---|
| | 479 | |
|---|
| | 480 | ------------------------------------------------------------------------ |
|---|
| | 481 | r212 | ed | 2004-04-26 12:17:36 -0700 (Mon, 26 Apr 2004) | 10 lines |
|---|
| | 482 | |
|---|
| | 483 | Modified the reCreate() method to better assign properties. There are still |
|---|
| | 484 | some artifacts to work out that mostly involve property assignment order; |
|---|
| | 485 | for example, the method was restoring the Left, Right, and Width properties |
|---|
| | 486 | in such a way that controls were being moved every time they were |
|---|
| | 487 | re-created. I added some extra code to handle this, but there are some |
|---|
| | 488 | similar problems with fonts that need to be addressed. |
|---|
| | 489 | |
|---|
| | 490 | I left in a line that prints out all failed property assignments, so that we |
|---|
| | 491 | remember to handle these exceptions. |
|---|
| | 492 | |
|---|
| | 493 | ------------------------------------------------------------------------ |
|---|
| | 494 | r211 | paul | 2004-04-24 17:06:40 -0700 (Sat, 24 Apr 2004) | 2 lines |
|---|
| | 495 | |
|---|
| | 496 | Fix inconsistency in dRadioGroup. |
|---|
| | 497 | |
|---|
| | 498 | ------------------------------------------------------------------------ |
|---|
| | 499 | r210 | paul | 2004-04-23 16:19:27 -0700 (Fri, 23 Apr 2004) | 4 lines |
|---|
| | 500 | |
|---|
| | 501 | Experimenting with a print preview of the browse records - push the |
|---|
| | 502 | preview button when on the browse page. Ugly but at least it's a |
|---|
| | 503 | start. |
|---|
| | 504 | |
|---|
| | 505 | ------------------------------------------------------------------------ |
|---|
| | 506 | r209 | paul | 2004-04-23 15:51:36 -0700 (Fri, 23 Apr 2004) | 2 lines |
|---|
| | 507 | |
|---|
| | 508 | Change name of dOptionGroup to dRadioGroup. |
|---|
| | 509 | |
|---|
| | 510 | ------------------------------------------------------------------------ |
|---|
| | 511 | r208 | paul | 2004-04-23 15:33:55 -0700 (Fri, 23 Apr 2004) | 10 lines |
|---|
| | 512 | |
|---|
| | 513 | Fix some bugs in dOptionGroup. |
|---|
| | 514 | |
|---|
| | 515 | Experimental: I'm actually scared at how easy this was to implement, but I added |
|---|
| | 516 | a reCreate() function to dPemMixin, so now any object can reinstantiate itself |
|---|
| | 517 | by calling self.reCreate(). The intent is really for the daboDesigner to be able |
|---|
| | 518 | to reinstantiate an object at will, such as when a property changes that won't |
|---|
| | 519 | take effect at runtime, such as Alignment, BorderStyle, PasswordEntry, and all the |
|---|
| | 520 | useful properties of dOptionGroup. |
|---|
| | 521 | |
|---|
| | 522 | |
|---|
| | 523 | ------------------------------------------------------------------------ |
|---|
| | 524 | r207 | paul | 2004-04-23 13:38:39 -0700 (Fri, 23 Apr 2004) | 2 lines |
|---|
| | 525 | |
|---|
| | 526 | Fix typos causing TypeError on instantiation. |
|---|
| | 527 | |
|---|
| | 528 | ------------------------------------------------------------------------ |
|---|
| | 529 | r206 | paul | 2004-04-23 12:50:36 -0700 (Fri, 23 Apr 2004) | 13 lines |
|---|
| | 530 | |
|---|
| | 531 | Add dOptionGroup, based on wx.RadioBox. |
|---|
| | 532 | |
|---|
| | 533 | Modify icon for dLabel. Still not happy with it, but it is better |
|---|
| | 534 | than the last one. |
|---|
| | 535 | |
|---|
| | 536 | Simplify all constructors of the dControls with new PostCreate() |
|---|
| | 537 | feature of wxPython. |
|---|
| | 538 | |
|---|
| | 539 | Remove the echoing of the icon file name from dIcons, which Ed noticed |
|---|
| | 540 | while running daboDesigner. |
|---|
| | 541 | |
|---|
| | 542 | |
|---|
| | 543 | |
|---|
| | 544 | ------------------------------------------------------------------------ |
|---|
| | 545 | r205 | paul | 2004-04-23 08:54:16 -0700 (Fri, 23 Apr 2004) | 2 lines |
|---|
| | 546 | |
|---|
| | 547 | Make FontFace read-only. |
|---|
| | 548 | |
|---|
| | 549 | ------------------------------------------------------------------------ |
|---|
| | 550 | r204 | ed | 2004-04-23 05:43:10 -0700 (Fri, 23 Apr 2004) | 3 lines |
|---|
| | 551 | |
|---|
| | 552 | Corrected copy/paste bug: _getBackColorEditorInfo was not present; instead, |
|---|
| | 553 | _getForeColorEditorInfo was listed twice. |
|---|
| | 554 | |
|---|
| | 555 | ------------------------------------------------------------------------ |
|---|
| | 556 | r203 | ed | 2004-04-23 05:35:17 -0700 (Fri, 23 Apr 2004) | 4 lines |
|---|
| | 557 | |
|---|
| | 558 | Changed the spelling of the editor for colors to 'colour', to be consistent |
|---|
| | 559 | with the rest of wxPython. It's odd having to remember when to write which |
|---|
| | 560 | spelling, so 'colour' it is. |
|---|
| | 561 | |
|---|
| | 562 | ------------------------------------------------------------------------ |
|---|
| | 563 | r202 | paul | 2004-04-22 18:42:04 -0700 (Thu, 22 Apr 2004) | 2 lines |
|---|
| | 564 | |
|---|
| | 565 | Add other control icons, and make a better dEditBox icon. |
|---|
| | 566 | |
|---|
| | 567 | ------------------------------------------------------------------------ |
|---|
| | 568 | r201 | paul | 2004-04-22 18:01:11 -0700 (Thu, 22 Apr 2004) | 4 lines |
|---|
| | 569 | |
|---|
| | 570 | Add icon dEditBox.png, which will display in the daboDesigner if you make |
|---|
| | 571 | the changes I'm about to commit. |
|---|
| | 572 | |
|---|
| | 573 | |
|---|
| | 574 | ------------------------------------------------------------------------ |
|---|
| | 575 | r200 | paul | 2004-04-22 18:00:22 -0700 (Thu, 22 Apr 2004) | 6 lines |
|---|
| | 576 | |
|---|
| | 577 | Make the daboDesignerClass dict have a prompt key as well that can include |
|---|
| | 578 | a hotkey value. |
|---|
| | 579 | |
|---|
| | 580 | Fix dIcons.getIconBitmap() to really return null bitmaps when the file |
|---|
| | 581 | doesn't exist. |
|---|
| | 582 | |
|---|
| | 583 | ------------------------------------------------------------------------ |
|---|
| | 584 | r199 | paul | 2004-04-22 15:26:07 -0700 (Thu, 22 Apr 2004) | 2 lines |
|---|
| | 585 | |
|---|
| | 586 | Add the font editor info to the Font property. |
|---|
| | 587 | |
|---|
| | 588 | ------------------------------------------------------------------------ |
|---|
| | 589 | r198 | paul | 2004-04-22 14:54:54 -0700 (Thu, 22 Apr 2004) | 5 lines |
|---|
| | 590 | |
|---|
| | 591 | Move property SelectOnEntry from dDataControlMixin to dTextBox and |
|---|
| | 592 | dEditBox as it only applies to text controls. I should probably make |
|---|
| | 593 | a dTextControlMixin to avoid the code duplication - another day. |
|---|
| | 594 | |
|---|
| | 595 | |
|---|
| | 596 | ------------------------------------------------------------------------ |
|---|
| | 597 | r197 | ed | 2004-04-22 13:53:28 -0700 (Thu, 22 Apr 2004) | 2 lines |
|---|
| | 598 | |
|---|
| | 599 | Corrected indentation in the docstring for the class. |
|---|
| | 600 | |
|---|
| | 601 | ------------------------------------------------------------------------ |
|---|
| | 602 | r196 | paul | 2004-04-22 12:29:23 -0700 (Thu, 22 Apr 2004) | 5 lines |
|---|
| | 603 | |
|---|
| | 604 | Extract doDefault() from dPemMixin and put in new dabo.common submodule, |
|---|
| | 605 | and make dPemMixin inherit from dabo.ui.common.DoDefaultMixin. This was |
|---|
| | 606 | because doDefault() has broader use than just inside the UI part of dabo. |
|---|
| | 607 | |
|---|
| | 608 | |
|---|
| | 609 | ------------------------------------------------------------------------ |
|---|
| | 610 | r195 | paul | 2004-04-22 10:53:13 -0700 (Thu, 22 Apr 2004) | 5 lines |
|---|
| | 611 | |
|---|
| | 612 | Reimplemented addObject() to take a classRef directly instead of className and |
|---|
| | 613 | moduleName strings. This is better because it leaves it up to the subclass to |
|---|
| | 614 | make sure the proper module is imported, which is where that belongs. |
|---|
| | 615 | |
|---|
| | 616 | |
|---|
| | 617 | ------------------------------------------------------------------------ |
|---|
| | 618 | r194 | paul | 2004-04-22 10:27:06 -0700 (Thu, 22 Apr 2004) | 4 lines |
|---|
| | 619 | |
|---|
| | 620 | Keep the details of building daboDesignerClasses from polluting |
|---|
| | 621 | the module's namespace. |
|---|
| | 622 | |
|---|
| | 623 | |
|---|
| | 624 | ------------------------------------------------------------------------ |
|---|
| | 625 | r193 | paul | 2004-04-22 10:22:04 -0700 (Thu, 22 Apr 2004) | 11 lines |
|---|
| | 626 | |
|---|
| | 627 | Update dabo.ui.daboDesignerClasses to be a list of dictionaries, with |
|---|
| | 628 | keys on 'name', 'class', 'topLevel', 'icon', and 'doc'. The |
|---|
| | 629 | topLevel key can be used to determine if the object can be added |
|---|
| | 630 | to another control, or if it must be the top level object. The icon |
|---|
| | 631 | key will have a picture of the control suitable for displaying in a |
|---|
| | 632 | menu or toolbar control-picker. The doc key provides some help text. |
|---|
| | 633 | |
|---|
| | 634 | After adding the doc key above, I finally got around to writing short |
|---|
| | 635 | docstrings for the various dControls. |
|---|
| | 636 | |
|---|
| | 637 | |
|---|
| | 638 | ------------------------------------------------------------------------ |
|---|
| | 639 | r192 | paul | 2004-04-22 06:59:43 -0700 (Thu, 22 Apr 2004) | 6 lines |
|---|
| | 640 | |
|---|
| | 641 | Add daboDesignerClasses list to dabo.ui module, which is a list of class references |
|---|
| | 642 | to the valid dabo classes to show in the designer. |
|---|
| | 643 | |
|---|
| | 644 | Our users can do the same thing with their modules, to control what of their custom |
|---|
| | 645 | classes show in the designer. |
|---|
| | 646 | |
|---|
| | 647 | ------------------------------------------------------------------------ |
|---|
| | 648 | r191 | paul | 2004-04-21 19:26:19 -0700 (Wed, 21 Apr 2004) | 5 lines |
|---|
| | 649 | |
|---|
| | 650 | Add the promised addObject() method to dPemMixin, allowing code like: |
|---|
| | 651 | self.addObject("dTextBox", "dabo.ui", "txtLastName") |
|---|
| | 652 | self.txtLastName.FontBold = True |
|---|
| | 653 | |
|---|
| | 654 | |
|---|
| | 655 | ------------------------------------------------------------------------ |
|---|
| | 656 | r190 | paul | 2004-04-21 17:29:14 -0700 (Wed, 21 Apr 2004) | 6 lines |
|---|
| | 657 | |
|---|
| | 658 | Tabs! |
|---|
| | 659 | |
|---|
| | 660 | Or, a review of the entire source base of Dabo. <g> |
|---|
| | 661 | |
|---|
| | 662 | Also, removed the appRoot directory. |
|---|
| | 663 | |
|---|
| | 664 | ------------------------------------------------------------------------ |
|---|
| | 665 | r189 | paul | 2004-04-21 16:23:33 -0700 (Wed, 21 Apr 2004) | 23 lines |
|---|
| | 666 | |
|---|
| | 667 | Increase robustness of property setters by coercing proper data types |
|---|
| | 668 | and raising exceptions with improper values. |
|---|
| | 669 | |
|---|
| | 670 | Fix a few places where my strategy for setting/deleting window style |
|---|
| | 671 | flags wasn't up to snuff. |
|---|
| | 672 | |
|---|
| | 673 | Add 'showInDesigner' key to the getPropertyInfo dict. This tells the |
|---|
| | 674 | designer whether to show the property at all. Set WindowHandle, Size, |
|---|
| | 675 | and Position to not show in the designer. |
|---|
| | 676 | |
|---|
| | 677 | Add 'preInitProperty' key to the getPropertyInfo dict. This tells the |
|---|
| | 678 | designer where to put this property setting in the class's source code. |
|---|
| | 679 | Some properties need to be set before the object is fully constructed, |
|---|
| | 680 | while most need to be set after the object is fully constructed. Set |
|---|
| | 681 | the few properties I know about that need to be defined early. |
|---|
| | 682 | |
|---|
| | 683 | Add some editorInfo overrides to some properties, where the defaults |
|---|
| | 684 | wouldn't be adequate. For instance, the default for integers is -65536 |
|---|
| | 685 | to 65536, which is completely inappropriate for properties like Width |
|---|
| | 686 | and Height, which can't go below 0. |
|---|
| | 687 | |
|---|
| | 688 | |
|---|
| | 689 | |
|---|
| | 690 | ------------------------------------------------------------------------ |
|---|
| | 691 | r188 | paul | 2004-04-21 14:16:36 -0700 (Wed, 21 Apr 2004) | 22 lines |
|---|
| | 692 | |
|---|
| | 693 | Separate out the property initialization, based on whether the property |
|---|
| | 694 | needs to be passed as a style parameter to the constructor (property will |
|---|
| | 695 | be read-only at runtime), or whether the property must be set after the |
|---|
| | 696 | object is fully instantiated (property will be read/write at runtime |
|---|
| | 697 | unless specified differently in the property assignment). |
|---|
| | 698 | |
|---|
| | 699 | Add getPropertyInfo() to dPemMixin, which returns a dict of useful information |
|---|
| | 700 | on the passed property name, including the data type, the editor to use, and |
|---|
| | 701 | the docstring. This is to make the designer much more generic: it can just |
|---|
| | 702 | query the object for most of the information it needs. |
|---|
| | 703 | |
|---|
| | 704 | Part of the logic of the above involves checking for the editor to use by |
|---|
| | 705 | calling a special method which is named similarly to the given property. |
|---|
| | 706 | If that method doesn't exist, a default value for editor info is returned, |
|---|
| | 707 | based on data type, which is how I've left it for most of the properties. |
|---|
| | 708 | The only properties I've specifically defined editors for so far are the ones |
|---|
| | 709 | that have a set number of choices to be presented in a list, such as 'Alignment'. |
|---|
| | 710 | |
|---|
| | 711 | Add property 'AutoResize' to dLabel. |
|---|
| | 712 | |
|---|
| | 713 | |
|---|
| | 714 | |
|---|
| | 715 | ------------------------------------------------------------------------ |
|---|
| | 716 | r187 | paul | 2004-04-20 17:44:14 -0700 (Tue, 20 Apr 2004) | 17 lines |
|---|
| | 717 | |
|---|
| | 718 | Change some of my " to ' <g>. Localize some strings. |
|---|
| | 719 | |
|---|
| | 720 | Change multi-state properties, such as Alignment, to have string |
|---|
| | 721 | identifiers instead of integer identifiers. |
|---|
| | 722 | |
|---|
| | 723 | Give dForm the wx interface, just like I did for the dControls earlier. |
|---|
| | 724 | Remove setupResources() from dForm as I don't think that is the interface |
|---|
| | 725 | we'll use (I don't think we'll use resources at all). |
|---|
| | 726 | |
|---|
| | 727 | Fix some properties to work correctly. This was after testing with |
|---|
| | 728 | dTextBox in daboDesigner. I need to figure out how to deal with the |
|---|
| | 729 | styles that have to be passed to the constructor, not altered after the |
|---|
| | 730 | object has already been created (Alignment, for example). I'm thinking |
|---|
| | 731 | that we'll have to get a copy of the object's properties, destroy it, |
|---|
| | 732 | and then recreate it. |
|---|
| | 733 | |
|---|
| | 734 | |
|---|
| | 735 | ------------------------------------------------------------------------ |
|---|
| | 736 | r186 | paul | 2004-04-19 22:46:27 -0700 (Mon, 19 Apr 2004) | 16 lines |
|---|
| | 737 | |
|---|
| | 738 | Fix some import statements. Fix bug in property 'ToolTipText'. Fix ui test |
|---|
| | 739 | script to use the new property interface. |
|---|
| | 740 | |
|---|
| | 741 | Rework the dControl's constructors to pretty much conform to wx's constructor |
|---|
| | 742 | format. There are some exceptions, and I haven't done the dForm's yet. To be |
|---|
| | 743 | completely safe, anything beyond parent and id should use named arguments even |
|---|
| | 744 | though theoretically positional arguments should work. |
|---|
| | 745 | |
|---|
| | 746 | Add a requery button to the select page of dFormDataNav, and try to set it as |
|---|
| | 747 | the default button (click on <Enter>) but at least on Linux that isn't working |
|---|
| | 748 | as advertised. Rework the select page to use dControls instead of wx controls |
|---|
| | 749 | directly and use the property interface. |
|---|
| | 750 | |
|---|
| | 751 | |
|---|
| | 752 | |
|---|
| | 753 | |
|---|
| | 754 | ------------------------------------------------------------------------ |
|---|
| | 755 | r185 | paul | 2004-04-19 16:25:37 -0700 (Mon, 19 Apr 2004) | 16 lines |
|---|
| | 756 | |
|---|
| | 757 | Simplify icon names. Add a couple new icons. |
|---|
| | 758 | |
|---|
| | 759 | Add new actions to edit menu: cut/copy/paste/find. Surprisingly, I |
|---|
| | 760 | had to implement cut/copy/paste myself using the clipboard object, |
|---|
| | 761 | even though cut/copy/paste is one thing that is pretty much universal |
|---|
| | 762 | among the various platforms. |
|---|
| | 763 | |
|---|
| | 764 | Decorate various menu items with appropriate icons. Make dMenu inherit |
|---|
| | 765 | from dPemMixin. |
|---|
| | 766 | |
|---|
| | 767 | Add property 'WindowState' to the forms, which provides one interface to |
|---|
| | 768 | get/set whether the form is minimized, normal, maximized, or full screen. |
|---|
| | 769 | |
|---|
| | 770 | |
|---|
| | 771 | |
|---|
| | 772 | |
|---|
| | 773 | ------------------------------------------------------------------------ |
|---|
| | 774 | r184 | paul | 2004-04-17 14:00:44 -0700 (Sat, 17 Apr 2004) | 55 lines |
|---|
| | 775 | |
|---|
| | 776 | Make dLabel not auto-resize to the length of the text. Fix a couple minor |
|---|
| | 777 | bugs. |
|---|
| | 778 | |
|---|
| | 779 | Add the following properties, most of which are saved in the WindowStyleFlags |
|---|
| | 780 | and so otherwise would be kind of difficult to use: |
|---|
| | 781 | |
|---|
| | 782 | dCheckBox: |
|---|
| | 783 | .Alignment (left, right) |
|---|
| | 784 | |
|---|
| | 785 | dEditBox: |
|---|
| | 786 | .Alignment (left, center, right) |
|---|
| | 787 | .ReadOnly |
|---|
| | 788 | |
|---|
| | 789 | dLabel: |
|---|
| | 790 | .Alignment (left, center, right) |
|---|
| | 791 | |
|---|
| | 792 | dPageFrame: |
|---|
| | 793 | .TabPosition (top, left, right, bottom) |
|---|
| | 794 | |
|---|
| | 795 | dSpinner: |
|---|
| | 796 | .SpinnerWrap (does the value wrap from low to high, and vice-versa) |
|---|
| | 797 | .SpinnerArrowKeys (can the user spin up/down with the keyboard) |
|---|
| | 798 | |
|---|
| | 799 | dTextBox: |
|---|
| | 800 | .Alignment (left, center, right) |
|---|
| | 801 | .ReadOnly (like Enabled=False but allows text selection) |
|---|
| | 802 | .PasswordEntry (if True, echoes asterisks instead of Value) |
|---|
| | 803 | |
|---|
| | 804 | All forms: |
|---|
| | 805 | .BorderResizable |
|---|
| | 806 | .ShowMaxButton |
|---|
| | 807 | .ShowMinButton |
|---|
| | 808 | .ShowCloseButton |
|---|
| | 809 | .ShowCaption |
|---|
| | 810 | .ShowSystemMenu |
|---|
| | 811 | .TinyTitleBar |
|---|
| | 812 | |
|---|
| | 813 | All controls and forms: |
|---|
| | 814 | .BorderStyle (none, simple, raised, sunken) |
|---|
| | 815 | .WindowHandle (platform-specific Hwnd) |
|---|
| | 816 | |
|---|
| | 817 | Note that in most cases I haven't tested any property interactions yet, but |
|---|
| | 818 | in theory they should all work. Some of these won't work on live objects, so |
|---|
| | 819 | in the future when integrating with the designer we'll probably have to recreate |
|---|
| | 820 | the object after some of these properties change. My feeling is that most testing |
|---|
| | 821 | of the properties can wait until the designer is instantiating these controls, at |
|---|
| | 822 | which point we'll have a convenient interactive testing environment. |
|---|
| | 823 | |
|---|
| | 824 | Note also that I chose to skip over some possibilities, such as making a 3-state |
|---|
| | 825 | checkbox control and some other styles that only work on this or that platform. |
|---|
| | 826 | We can revisit these in the future and choose to put them in, but my feeling is |
|---|
| | 827 | that if it doesn't apply to all platforms, it shouldn't apply to any platform. |
|---|
| | 828 | Keeping Dabo at the lowest common functionality will reduce surprises and headaches |
|---|
| | 829 | for our users later, when they try to port their app from Windows to Mac. |
|---|
| | 830 | |
|---|
| | 831 | ------------------------------------------------------------------------ |
|---|
| | 832 | r183 | paul | 2004-04-16 15:50:29 -0700 (Fri, 16 Apr 2004) | 11 lines |
|---|
| | 833 | |
|---|
| | 834 | Change name of property 'ParentClass' to 'SuperClass'. |
|---|
| | 835 | |
|---|
| | 836 | Add flat Font* properties, including FontInfo which is a text-string |
|---|
| | 837 | representation of the current font. |
|---|
| | 838 | |
|---|
| | 839 | Add properties 'Right' and 'Bottom' just because I guess... |
|---|
| | 840 | |
|---|
| | 841 | Fix a bug that was returning the object's position instead of the |
|---|
| | 842 | object's size. |
|---|
| | 843 | |
|---|
| | 844 | |
|---|
| | 845 | ------------------------------------------------------------------------ |
|---|
| | 846 | r182 | paul | 2004-04-16 11:49:55 -0700 (Fri, 16 Apr 2004) | 9 lines |
|---|
| | 847 | |
|---|
| | 848 | Add property 'Class' to dPemMixin, and give meaningful values to properties |
|---|
| | 849 | 'Class', 'ParentClass', and 'BaseClass'. self.Class will return a classref |
|---|
| | 850 | to the class the object is based on. self.ParentClass will return a classref |
|---|
| | 851 | to the parent class, or None if the parent class is higher up than self.BaseClass. |
|---|
| | 852 | self.BaseClass will return a classref to the base dControl of the class, NOT |
|---|
| | 853 | the base class of whatever UI is in use (wx.EventHandler in wxPython). |
|---|
| | 854 | |
|---|
| | 855 | |
|---|
| | 856 | |
|---|
| | 857 | ------------------------------------------------------------------------ |
|---|
| | 858 | r181 | paul | 2004-04-15 11:52:29 -0700 (Thu, 15 Apr 2004) | 15 lines |
|---|
| | 859 | |
|---|
| | 860 | Fix Linux segmentation fault and Windows Fatal Error c0000005 that |
|---|
| | 861 | was happening on destruction of the main frame. This appears to be |
|---|
| | 862 | a problem way down in the bowels of wx that I exposed with yesterday's |
|---|
| | 863 | addition of the dPemMixin.__getattr__() code, which was doing a |
|---|
| | 864 | self.GetName() to be able to display the name of the object in the |
|---|
| | 865 | raised AttributeError exception. I think the base C++ object is |
|---|
| | 866 | already destroyed which resulted in GetName() segfaulting. My workaround |
|---|
| | 867 | saves self.GetName() to _name at opportune times, and __getattr__ uses |
|---|
| | 868 | the value of _name for the AttributeError. |
|---|
| | 869 | |
|---|
| | 870 | Add class dPanel, and make dPage inherit from that instead of from |
|---|
| | 871 | wx.Panel. |
|---|
| | 872 | |
|---|
| | 873 | |
|---|
| | 874 | |
|---|
| | 875 | ------------------------------------------------------------------------ |
|---|
| | 876 | r180 | paul | 2004-04-14 17:45:07 -0700 (Wed, 14 Apr 2004) | 16 lines |
|---|
| | 877 | |
|---|
| | 878 | Add a classmethod doDefault() to dPemMixin, which allows superclass |
|---|
| | 879 | methods to be called using the VFP-like syntax of: |
|---|
| | 880 | |
|---|
| | 881 | retval = class.doDefault([args]) |
|---|
| | 882 | |
|---|
| | 883 | For instance: |
|---|
| | 884 | |
|---|
| | 885 | class MyTextBox(dTextBox): |
|---|
| | 886 | def afterInit(self): |
|---|
| | 887 | print "afterInit" |
|---|
| | 888 | MyTextBox.doDefault() |
|---|
| | 889 | |
|---|
| | 890 | This can replace the super(class,self).methodName([args]) syntax, which |
|---|
| | 891 | I think is much friendlier. |
|---|
| | 892 | |
|---|
| | 893 | |
|---|
| | 894 | ------------------------------------------------------------------------ |
|---|
| | 895 | r179 | paul | 2004-04-14 13:12:25 -0700 (Wed, 14 Apr 2004) | 18 lines |
|---|
| | 896 | |
|---|
| | 897 | Split the __init__ phase into 2-stage, for future accomodation of loading |
|---|
| | 898 | properties from resource files, and to accomodate setting certain extra |
|---|
| | 899 | styles that cannot otherwise be set. Add beforeInit() and afterInit() |
|---|
| | 900 | hooks to dPemMixin which is an ancestor of all the dControls and dForms, |
|---|
| | 901 | and provide docstrings to encourage users to put their code in these methods |
|---|
| | 902 | instead of in __init__() directly. |
|---|
| | 903 | |
|---|
| | 904 | Add a __getattr__() in dPemMixin which will try to resolve attributes to |
|---|
| | 905 | child windows, allowing references like 'self.myPanel.myTextBox.Value', for |
|---|
| | 906 | example. |
|---|
| | 907 | |
|---|
| | 908 | Remove dControlMixin.setDefaultFont(), as this was cruft from the previous |
|---|
| | 909 | Dabo which doesn't appear to be necessary anymore. |
|---|
| | 910 | |
|---|
| | 911 | Add properties 'SpinnerHighValue' and 'SpinnerLowValue' to dSpinner. |
|---|
| | 912 | |
|---|
| | 913 | |
|---|
| | 914 | |
|---|
| | 915 | ------------------------------------------------------------------------ |
|---|
| | 916 | r178 | paul | 2004-04-14 08:14:36 -0700 (Wed, 14 Apr 2004) | 9 lines |
|---|
| | 917 | |
|---|
| | 918 | Simplify dForm.activeControlValid() and dDataControlMixin.SetFocus() by |
|---|
| | 919 | determining which control has the focus using wx's Window.FindFocus() |
|---|
| | 920 | method instead of saving this information manually. |
|---|
| | 921 | |
|---|
| | 922 | Add property Default to dCommandButton, which specifies if this command |
|---|
| | 923 | button will raise a EVT_BUTTON when the <Enter> key is pressed and not |
|---|
| | 924 | handled elsewhere on the form. |
|---|
| | 925 | |
|---|
| | 926 | |
|---|
| | 927 | ------------------------------------------------------------------------ |
|---|
| | 928 | r177 | paul | 2004-04-13 17:35:31 -0700 (Tue, 13 Apr 2004) | 1 line |
|---|
| | 929 | |
|---|
| | 930 | Fixes to make Dabo behave better on Mac, including not showing the main frame |
|---|
| | 931 | ------------------------------------------------------------------------ |
|---|
| | 932 | r176 | paul | 2004-04-13 16:37:57 -0700 (Tue, 13 Apr 2004) | 1 line |
|---|
| | 933 | |
|---|
| | 934 | Fix for Mac to make the about menu appear in the app menu |
|---|
| | 935 | ------------------------------------------------------------------------ |
|---|
| | 936 | r175 | paul | 2004-04-13 14:27:39 -0700 (Tue, 13 Apr 2004) | 1 line |
|---|
| | 937 | |
|---|
| | 938 | Oops, I left in a debug line with my last commit. |
|---|
| | 939 | ------------------------------------------------------------------------ |
|---|
| | 940 | r174 | paul | 2004-04-13 14:26:19 -0700 (Tue, 13 Apr 2004) | 1 line |
|---|
| | 941 | |
|---|
| | 942 | Minor fixes for Windows. One remaining problem is that Windows dForm's don't fire an implicit Activate event when first instantiated, so my logic for restoring size and position isn't working. I think this will fix itself when I move to three-stage creation, which is on my list for the ability to integrate resource files. |
|---|
| | 943 | ------------------------------------------------------------------------ |
|---|
| | 944 | r173 | paul | 2004-04-13 12:28:50 -0700 (Tue, 13 Apr 2004) | 8 lines |
|---|
| | 945 | |
|---|
| | 946 | Brainstorm of our eventual announcement of Dabo. We need to review |
|---|
| | 947 | and modify and make clear anything that is opaque, and once we are |
|---|
| | 948 | happy with it we can decide when to announce. We can decide if we |
|---|
| | 949 | want to announce before we have a workable install, or if we should |
|---|
| | 950 | wait until all that is documented, but I thought I'd get started on |
|---|
| | 951 | the ultimate announcement now rather than later. |
|---|
| | 952 | |
|---|
| | 953 | |
|---|
| | 954 | ------------------------------------------------------------------------ |
|---|
| | 955 | r172 | paul | 2004-04-12 18:43:15 -0700 (Mon, 12 Apr 2004) | 24 lines |
|---|
| | 956 | |
|---|
| | 957 | General skim/review of everything in dabo/ui/uiwx/classes. This led to |
|---|
| | 958 | some rearranging of things: |
|---|
| | 959 | |
|---|
| | 960 | In general, I fixed the import statements to import into private namespaces |
|---|
| | 961 | instead of into the module-global namespace. 'Namespaces are good', I think, |
|---|
| | 962 | is the quote on the back of our PyCon 2004 shirts. :) Seriously, this is |
|---|
| | 963 | much safer as we don't risk separate modules stepping on each other's names. |
|---|
| | 964 | |
|---|
| | 965 | The way I had it, dPageFrame and dPage were not base-class-like, in that |
|---|
| | 966 | they both tied in intimately with dFormDataNav. I made new dPageFrame and |
|---|
| | 967 | dPage base classes, with just basic behavior that would apply to all |
|---|
| | 968 | subclasses, not just the data nav form. I then subclassed dPageFrame |
|---|
| | 969 | to create dPageFrameDataNav, and I subclassed dPage to create dSelectPage, |
|---|
| | 970 | dBrowsePage, and dEditPage. |
|---|
| | 971 | |
|---|
| | 972 | I fixed some naming issues inside some of the page classes. |
|---|
| | 973 | |
|---|
| | 974 | There was still some old-Dabo cruft in dMainMenuBar, which I removed. |
|---|
| | 975 | |
|---|
| | 976 | Switched to the new-style super(class, instance).method() style of |
|---|
| | 977 | running the parent-class behavior wherever possible. |
|---|
| | 978 | |
|---|
| | 979 | Added a commandbutton to the test.py script. |
|---|
| | 980 | |
|---|
| | 981 | ------------------------------------------------------------------------ |
|---|
| | 982 | r171 | paul | 2004-04-09 10:51:04 -0700 (Fri, 09 Apr 2004) | 7 lines |
|---|
| | 983 | |
|---|
| | 984 | Make dform.ask2Save into a real property, and renamed it to AskToSave (sorry, |
|---|
| | 985 | I hate the 2 meaning 'to'. Always bugged me.) |
|---|
| | 986 | |
|---|
| | 987 | Make dform._set* coerce the values into boolean, so that if someone says: |
|---|
| | 988 | self.AskToSave=1, it will save True instead of 1. |
|---|
| | 989 | |
|---|
| | 990 | |
|---|
| | 991 | ------------------------------------------------------------------------ |
|---|
| | 992 | r170 | ed | 2004-04-09 05:18:35 -0700 (Fri, 09 Apr 2004) | 6 lines |
|---|
| | 993 | |
|---|
| | 994 | Changed all loc() calls to _() in the bizobj and data classes. |
|---|
| | 995 | |
|---|
| | 996 | Wrapped the "Do you want to save?" request in dForm with a boolean property |
|---|
| | 997 | to allow suppression of the call. |
|---|
| | 998 | |
|---|
| | 999 | |
|---|
| | 1000 | ------------------------------------------------------------------------ |
|---|
| | 1001 | r169 | paul | 2004-04-08 22:19:32 -0700 (Thu, 08 Apr 2004) | 2 lines |
|---|
| | 1002 | |
|---|
| | 1003 | Wrapped some strings in dForm to dLocalize. |
|---|
| | 1004 | |
|---|
| | 1005 | ------------------------------------------------------------------------ |
|---|
| | 1006 | r168 | paul | 2004-04-08 22:04:01 -0700 (Thu, 08 Apr 2004) | 15 lines |
|---|
| | 1007 | |
|---|
| | 1008 | There is an inconsistency in dBizobj.isChanged() versus dCursorMixin.isChanged(). |
|---|
| | 1009 | dBizobj's docstring states that it is going to just check the current record, while |
|---|
| | 1010 | dCursorMixin's docstring states it will check all records, which is what it does. |
|---|
| | 1011 | |
|---|
| | 1012 | I didn't change the docstrings, but I did add an allRows argument to both of these |
|---|
| | 1013 | functions, along with logic in dCursorMixin to act appropriately based on the |
|---|
| | 1014 | parameter. I made the default value of these arguments match the docstrings, so |
|---|
| | 1015 | allRows=False in dBizobj, and allRow=True in dCursorMixin. |
|---|
| | 1016 | |
|---|
| | 1017 | Changed the name of dLocalize.loc() to dLocalize._() to match the il8n conventions, |
|---|
| | 1018 | but loc() still works as well. Changed dForm's loc() calls to _() calls. |
|---|
| | 1019 | |
|---|
| | 1020 | Added a 'save changes' prompt to dForm.requery() when there are unsaved changes, |
|---|
| | 1021 | allowing Yes/No/Cancel choices. |
|---|
| | 1022 | |
|---|
| | 1023 | ------------------------------------------------------------------------ |
|---|
| | 1024 | r167 | paul | 2004-04-07 22:25:11 -0700 (Wed, 07 Apr 2004) | 1 line |
|---|
| | 1025 | |
|---|
| | 1026 | win32 compatibility |
|---|
| | 1027 | ------------------------------------------------------------------------ |
|---|
| | 1028 | r166 | paul | 2004-04-07 19:43:52 -0700 (Wed, 07 Apr 2004) | 1 line |
|---|
| | 1029 | |
|---|
| | 1030 | Fixes for win32 compatibility. |
|---|
| | 1031 | ------------------------------------------------------------------------ |
|---|
| | 1032 | r165 | paul | 2004-04-07 18:06:30 -0700 (Wed, 07 Apr 2004) | 2 lines |
|---|
| | 1033 | |
|---|
| | 1034 | I was testing on wxPython2.5/Win and found a couple minor problems. |
|---|
| | 1035 | |
|---|
| | 1036 | ------------------------------------------------------------------------ |
|---|
| | 1037 | r164 | paul | 2004-04-07 11:18:24 -0700 (Wed, 07 Apr 2004) | 7 lines |
|---|
| | 1038 | |
|---|
| | 1039 | Use new Bind() syntax for dForm's custom events. |
|---|
| | 1040 | |
|---|
| | 1041 | Also, remove dVCR from __init__ in the classes directory, which I |
|---|
| | 1042 | swear I removed before. I just wiped my Dabo and did a new checkout, |
|---|
| | 1043 | at which point I got a 'no module dVCR' error. Weird. |
|---|
| | 1044 | |
|---|
| | 1045 | |
|---|
| | 1046 | ------------------------------------------------------------------------ |
|---|
| | 1047 | r163 | paul | 2004-04-06 17:42:40 -0700 (Tue, 06 Apr 2004) | 11 lines |
|---|
| | 1048 | |
|---|
| | 1049 | Add class method getPropertyList() to dPemMixin, which provides a convenient |
|---|
| | 1050 | way to get a listing of the defined properties, either on a classref or on |
|---|
| | 1051 | an instance. Add some extra print statements inside dForm.addControl() to |
|---|
| | 1052 | show this in use. |
|---|
| | 1053 | |
|---|
| | 1054 | Fix some problems with the property accessors for some properties, specifically |
|---|
| | 1055 | initialize the values to None if not previously initialized. |
|---|
| | 1056 | |
|---|
| | 1057 | Implement Value property for data-aware controls. |
|---|
| | 1058 | |
|---|
| | 1059 | |
|---|
| | 1060 | ------------------------------------------------------------------------ |
|---|
| | 1061 | r162 | paul | 2004-04-06 15:36:22 -0700 (Tue, 06 Apr 2004) | 17 lines |
|---|
| | 1062 | |
|---|
| | 1063 | Set more property definitions in controls and forms, matching up wx |
|---|
| | 1064 | get/set functions to VFP property naming styles. One good side |
|---|
| | 1065 | effect is that you can now always refer to self.Parent to get the |
|---|
| | 1066 | containing object. As soon as only dControls are in use everywhere, |
|---|
| | 1067 | we'll be able to say 'self.Parent.Parent...'. Next, I'll probably add a |
|---|
| | 1068 | self.Form property which would be analagous to VFP's ThisForm. |
|---|
| | 1069 | |
|---|
| | 1070 | Make messagebox's center themselves on top of the active form, not on |
|---|
| | 1071 | top of the top level form. |
|---|
| | 1072 | |
|---|
| | 1073 | Make the main menu bar appear on all forms, which is more Linux-like. This |
|---|
| | 1074 | should have no effect on Windows where there is just one main menu bar on the |
|---|
| | 1075 | parent MDI form but I have yet to test that. |
|---|
| | 1076 | |
|---|
| | 1077 | |
|---|
| | 1078 | |
|---|
| | 1079 | |
|---|
| | 1080 | ------------------------------------------------------------------------ |
|---|
| | 1081 | r161 | paul | 2004-04-06 11:35:34 -0700 (Tue, 06 Apr 2004) | 2 lines |
|---|
| | 1082 | |
|---|
| | 1083 | Forgot to follow through converting SelectOnEntry to a property. |
|---|
| | 1084 | |
|---|
| | 1085 | ------------------------------------------------------------------------ |
|---|
| | 1086 | r160 | paul | 2004-04-06 11:24:48 -0700 (Tue, 06 Apr 2004) | 35 lines |
|---|
| | 1087 | |
|---|
| | 1088 | Remove extraneous getSQL() from the bizobj, now that getSQL() is a |
|---|
| | 1089 | passthrough to the cursor's sqlbuilder. |
|---|
| | 1090 | |
|---|
| | 1091 | I found another example in dCursorMixin where we catch all exceptions |
|---|
| | 1092 | and then raise dError. This isn't right, as we want the actual exception |
|---|
| | 1093 | to propagate up to the global error handler, not to hide it. |
|---|
| | 1094 | |
|---|
| | 1095 | Remove sqlBuilder from dFormDataNav, as it is now exposed in the bizobj. |
|---|
| | 1096 | Set up the requery funct |
|---|