Re: [Zope3-dev] Re: most specific interface?

2005-09-16 Thread Fred Drake
On 9/16/05, Florent Guillaume [EMAIL PROTECTED] wrote: (Or use a convenience method to do that, I'm not sure if alsoProvides() was ever implemented.) zope.interface.alsoProvides() works like a champ. -Fred -- Fred L. Drake, Jr.fdrake at gmail.com Zope Corporation

[Zope3-dev] Re: most specific interface?

2005-09-16 Thread Jean-Marc Orliaguet
Philipp von Weitershausen wrote: Florent Guillaume wrote: Philipp von Weitershausen wrote: from zope.app.content.interfaces import IContentType from zope.app.file.interfaces import IFile from zope.interface import directlyProvides directlyProvides(IFile, IContentType)

[Zope3-dev] Re: most specific interface?

2005-09-16 Thread Philipp von Weitershausen
Jean-Marc Orliaguet wrote: does alsoProvides() check for interfaces already listed? No, but directlyProvides does. Issuing the same directlyProvides(...) call twice has the same effect as issuing it once. Philipp ___ Zope3-dev mailing list

[Zope3-dev] Re: most specific interface?

2005-09-14 Thread Philipp von Weitershausen
Jean-Marc Orliaguet wrote: Philipp von Weitershausen wrote: Jean-Marc Orliaguet wrote: is the order of the list of interfaces implemented by an object subject to internal changes? I have identified the need for such a pattern: iface = object.interface() with: class

[Zope3-dev] Re: most specific interface?

2005-09-13 Thread Philipp von Weitershausen
Jean-Marc Orliaguet wrote: is the order of the list of interfaces implemented by an object subject to internal changes? I have identified the need for such a pattern: iface = object.interface() with: class someObject(object): implements(IMainInterface, ISecondaryInterface,

Re: [Zope3-dev] Re: most specific interface?

2005-09-13 Thread Jean-Marc Orliaguet
Janko Hauser wrote: Am 13.09.2005 um 12:43 schrieb Jean-Marc Orliaguet: But where do you put the 'directlyProvides' statement? in the class : Can't this be put in the interface definition module for IContentType? You mark other interfaces with the interface IContentType. __Janko I

Re: [Zope3-dev] Re: most specific interface?

2005-09-13 Thread Jim Fulton
Jean-Marc Orliaguet wrote: ... the idea is that you define as many categories as you need: IMetaType, ISomeCategory, IWidgetType ... and you create relations between interfaces with: directlyProvides(IFile, IContentType) Exactly. as if you had a relation tool, There are all sorts of