Ed Leafe wrote: > On Jan 26, 2007, at 4:10 AM, Uwe Grauer wrote: > >> Please change the extension for Classdesigner generated code files. >> The code in these files doesn't have anything to do with full python >> syntax. It is something like a subset of python syntax. > > No, that's not true at all. My guess is that you are > misunderstanding how to use that code. > >> I had a form with two buttons on it: >> A new button and a edit button which were used to call a childform >> to do >> the work. Because the functionality is very similar for this, i >> created >> a function callEditForm(self, newrecmode=False) which i called like >> self.callEditForm() from my editbutton and >> self.callEditFormn(newrecmode=True) from my newbutton. >> This doesn't work!!! >> Don't ask how long it took until i discovered this. >> Shame on me. > > Without seeing the code, I have no way of determining what is wrong. > Somehow it doesn't seem right that a button should be calling > self.callEditForm() instead of self.Form.callEditForm().
Sorry, typo. I called it with self.Form.callEditForm(..) >> So we should change the extension for classdesigner-code files to >> reflect this fact that it is really some sort of glue between the >> generated layout and real python code. >> Call it "form-code.dpy" or something like that but don't use the >> extension ".py" for this. > > Besides not being necessary, that would totally screw up using these > files with editors, which was the reason for creating them in the > first place. > Why screw up? They are textfiles. > I realize that there is definitive documentation for how all this > works, but please don't jump to the conclusion that it is no longer > valid Python. Either the usage is not clear, or there is a bug. > > -- Ed Leafe There might be a bug, yes. But it isn't valid python code either. Try to run it in python. So why shouldn't we reflect this as a different extension? Uwe _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
