improving 'BaseObject._renameAfterCreation'

Raphael Ritz <[email protected]>
Newsgroups gmane.comp.web.zope.plone.archetypes.devel
Organization Humboldt-University Berlin
Message-ID <[email protected]>
Hi,

in BaseObject._renameAfterCreation it is currently
hard coded that the candidate value for the new id
is coming from the title (by simply calling

     title = self.Title()

and working with that value further on.

Now I would like to be able to extend that such that
custom content types can optionally override this
behavior, e.g., by checking for a certain method
that people can provide to influence renaming.

Something like

    title = shasattr(self, '_at_RenameFrom')
            and self._at_RenameFrom()
            or self.Title()

should do it.

Any objections? Any better approaches to providing the
desired behavior? Any better names for the new method?

Raphael



-------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.