Hi, thought I'd break this one out of my previous long list.

>> Yay, something I fully understand.
> 
>       Great! You could work on the Class Designer, then!
> 
You, know, I think that's something I'd enjoy doing.  Remind me in a
couple of months, when I have a better understanding of dabo, and have
refactored the main app I'm co-responsible for at work (written by some
very smart (genuinely mean that) co-ops, who (unfortunately) tried to
make python look like php and seemed to have an aversion for using any
standard libraries.  Oh, and it seems they didn't find out about
'import' until late in the game; all their application 'libraries' are
actually execfile'd into the main script... and there's lots of
dependencies on global variables (and file-level code in their
'libraries.'))

But, back to the point, I just did the following:
1. create new form.
2. insert textbox
3. Go to random method for textbox, in this case, onKeyChar.
4. insert a space
Contents of code-editor in class editor is:
"""def onKeyChar(self, evt):
         """
5. save (via command-S)
6. Look at generated code in external editor:
"""### Dabo Class Designer code. You many freely edit the code,
### but do not change the comments containing:
###             'Dabo Code ID: XXXX',
### as these are needed to link the code to the objects.

## *!* ## Dabo Code ID: dTextBox-dForm
def onKeyChar(self, evt):

"""
7. back in the class designer code editor, the contents is now:
"""def onKeyChar(self, evt):
"""
    ie the whitespace has been stripped (both from the original
template, and the extra space I added).
8. try save again-> same thing.
9. try editing another method as per above (to see if it's something
about having that method in the active editor) and save-> two illegal
defs in generated code.

Only way to fix this - go to both methods, ctrl-A, delete (empty
editor), then save.  Now defs are gone from generated code.

Another slightly odd thing I noticed- after a save, the class editor
code editor always reverts back to the first method you ever edited.




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to