
martijn at fourdigits
May 9, 2008, 2:30 AM
Post #1 of 1
(36 views)
Permalink
|
Hello guys. A question about adapters : I've written two adapters wich implement my own interface IMyAdapter. The first adapter adapts CMFCore.interfaces._content.IFolderish objects and the other one CMFCore.interfaces._content.IContentish objects. One of the base classes of the IFolderish objects also implement the IContentish interface, so when I adapt folderish objects with IMyAdapter(object), the adapter registered for the IContentish objects always "wins". (and if it's a folderish object I want the adapter for IFolderish to jump in). In other words : How can I influence the order of adapter lookup? I'm feeling there should be a simple solution for this (applying a marker interface to folderish objects?), so I hope someone can point me in the right direction. Kind regards, Martijn. -- Martijn Jacobs Four Digits, Internet Solutions a: Willemsplein 15-1 6811 KB Arnhem NL kvk: 091621370000 | btw: 8161.22.234.B01 e-mail: martijn[at]fourdigits.nl | web: http://www.fourdigits.nl tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 _______________________________________________ Zope maillist - Zope[at]zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
|