[Zope3-Users] Design question (object or interface for category
implementation?)
Christophe Combelles
ccomb at free.fr
Wed Mar 7 03:02:21 EST 2007
Bernd Dorn a écrit :
>> But with 4), I guess I won't be able to assign two categories onto an
>> object,
>> An object can have only one ContentType
>
> this is not true an object can implement many interfaces so why shouldnt
> it be possible to assign many subclasses of IInterface (or did i m iss
> something?), use alsoProvides, not directlyProvides
ah yes right, I thought this because queryType only returns the first interface,
but I could have several of them.
>> This is simple, but now how do I assign a name to these interface, so
>> that the user will choose between "Client" and "Provider", and not
>> between "IClient" and "IProvider"?
>> Is it feasible with Tagged Value ? Or with the "name" attribute in
>> the zope:interface ZCML declaration?
>
> use the name attribute, skins in zope work the same way
How do you retrieve the name attribute?
I've watched the dir() of the interface I couldn't find anything. Maybe I could
find it somewhere in the registry?
More information about the Zope3-users
mailing list