From: Alex T. <al...@tw...> - 2005-07-27 16:39:26
|
Kevin Altis wrote: > Instead, what I expect would be better is to rename your copy of > resourceEditor.py, rename resourceOutput.py, and the propertyEditor.py > and propertyEditor.rsrc.py files. Then change the imports in your > files to use the newly renamed files as well as update the places > those modules are referenced in the code. Since PythonCard code files > avoid import * like the plague I don't think there will be any spots > of ambiguity. > > I used findfiles to search for references to the resourceOutput module > in the resourceEditor directory, I only see five lines, all in > resourceEditor.py, so that is easily updated in your new files without > any chance of conflicts. In the case of the propertyEditor module > there are only two lines impacted in resourceEditor.py, and if you > keep the same style import, then you only have to change the import > line to use the newly renamed propertyEditor.py module. Since it > doesn't appear there are any circular import references in > resourceOutput.py or propertyEditor.py, that should solve the problem > with a minimal of fuss. Obviously, you'll need to update your > propertyEditor.py module to use the newly renamed resourceOutput.py > module too. I suggest using the same prefix for the new > resourceEditor.py as well as your updated modules so that it is clear > that they go together. > > Let me know if that works. Yep - that works well. Obvious, given hindsight and an expert to tell me what to do :-) Thanks Kevin. I've actually added 7 files, rather than the 6 previously listed; it seems less confusing to duplicate the resourceEditor.rsrc.py to match the name of the new editor. So my local copy the resourceEditor now has 7 new files, all prefixed "multi" multiresourceEditor.py multiresourceEditor.rsrc.py modules/multipropertyEditor.py modules/multipropertyEditor.rsrc.py modules/multiComponents.py modules/multiComponents.rsrc.py modules/multiresourceOutput.py I also added a quick and easy way to switch the tricky name mangling scheme on or off, so that if we do decide to take it out, it should be straight-forward (and if I want to turn it back on in my local copy, that'll be easy too :-) Near the top of multipropertyEditor.py there is now a line DO_TRICKY_NAME_DERIVATIONS = True Changing this to be False will hide the check box, and always allow the name and label/text to vary independently. I'll give it another couple of hours testing, then commit these files (and all the images needed in the images directory) into CVS. -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.4/57 - Release Date: 22/07/2005 |