Re[2]: [Zope-CMF] Re: Overriding title from DefaultDublinCoreImpl

Rainer Thaden Rainer Thaden <thadi@gmx.de>
Thu, 25 Jul 2002 09:48:37 +0200


Hi Florent,

FG> If you want DublinCore's title to be your localized title, then you have
FG> to override Title and setTitle to go to the localized version using
FG> LocalPropertyManager's API.

FG> If you want other standard metadata to be multilingual, you'll have to
FG> do the same thing for those.

O.K. What i'm trying to do right now is to develop a new class
LocDefaultDublinCoreImpl which is derived from LocalPropertyManager
and DefaultDublinCoreImpl. It just overrides the metadata attributes
and methods and uses localized ones instead. I can use this as a base
class (if it works) instead of overriding the DublinCore methods in
every class. 

Are there some complications to be expected?

FG> And to answer your last question: python is not C++, you can't have two
FG> version of a method with a different number of arguments. In python the
FG> last defined or first inherited function with the correct name wins.

When i override a method and add a new parameter, i think i would have
to set the added parameter as None by default, so that if someone
calls the method in the 'old style' it doesn't fail with e.g.
'expected 3 params, only 2 passed'.

Correct?

8< ------ snipped long code description ----- >8


-- 
Regards,
 Rainer                            mailto:thadi@gmx.de