[Erp5-dev] own getTitle

Jérome Perrin jerome at nexedi.com
Fri Mar 28 13:51:42 CET 2008


bartek a écrit :
>> What's important is the "override : 1", this will override the default 
>> getTitle accessor.
> 
> Ha - I didn't know it. Why it is not in HowToUsePropertySheets? ;)

I'll add it to this page.

> Actually, it adds a big question mark to XMLObject_type_based_title - 
> since this way one can achieve the same result, with probably much less 
> overhead (no redundant script lookups etc).

getTypeBasedMethod has been optimized a bit, but it's still slower than 
just calling an accessor, I guess XMLObject_type_based_title patch makes 
indexing slower.

The general problem with override is that it can only be used once per 
property, if two propertysheets wants to override the same accessor, the 
behaviour will be undefined (because it depends on accessors generation 
order). It's better to avoid using override on stock propertysheets, so 
that properties can still be overriden by customisation propertysheets 
if needed.

Jérome



More information about the Erp5-dev mailing list