Field.copy(name='newFieldName') keeps the names of the generated methods.
"Sune B. Woeller" <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.archetypes.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I am trying to copy a field with the copy() method from the Field class. I want the new field (the copy) to have another name than the original so I use copy(name='newFieldName'). It seems logical to me that copy() should also modify the names of the mutator/accessor, otherwise myfield.copy(name='newFieldName') does not make much sense - you end up with a field name newFieldName but with mutator = 'setOldFieldName' and so on. Should the behaviour of copy() be changed to also modify the names of the generated methods? If so, I will try to create a patch for copy, maybe using generateMethods to regenerate the methods. regards, Sune B. Woeller ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click