[Zope3-Users] How to manually define an object's provided interfaces?

Janko Hauser jhauser at zscout.de
Mon May 29 08:53:51 EDT 2006


Am 29.05.2006 um 14:24 schrieb Frank Burkhardt:

> OK - this was a bit confusing. One more try:
>
>  I want to make an object provided one interface (IFile) always and  
> one
>  interface (IImage) "sometimes". Sometimes means "whenever libmagic  
> thinks,
>  the file is an Image". I don't want to modify any interface but  
> only the
>  object's list of provided interfaces.

So it's an additional interface. Look up the usage of  
"directlyProvides', with this, one can set additional interfaces on  
an instance. It is often used for marker interfaces. This would also  
be a hint for your problem, only set a marker on the file object, so  
that image related adapters could be used for this marked instance.

With regards,

__Janko Hauser

-- 
Janko Hauser  email:  jhauser at zscout.de
               mobile: +49 1721 641552


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 155 bytes
Desc: Signierter Teil der Nachricht
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20060529/e369053c/PGP.bin


More information about the Zope3-users mailing list