[Grok-dev] How to create an interface providing another interface

Lennart Regebro regebro at gmail.com
Thu Feb 5 04:47:30 EST 2009

On Thu, Feb 5, 2009 at 14:32, Simon Elbaz <simon.elbaz at free.fr> wrote:
> Then an adapter called 'undo' adapts (IContent,IBrowserRequest) to the
> interface EditMenu is registered with the factory undo (which will be the
> result of a future lookup)

Interfaces should normally be called ISomthinng, ie IEditMenu in this
case. If somebody decided to call it otherwise, they are confusing me.

>>>> zope.component.getAdapters((object, request), self.getMenuItemType())
> The getMenuItemType function gets the utility providing IMenuItemType under
> the name 'edit':the result is the EditMenu interface defined at line n°23.
> The getAdapters function returns the factory stored for all the adapters of
> (object, request) implementing EditMenu interface. These factories are the
> menu items.
> If you followed me till here, thank you :)
> This is what I have understood from menu.py and menu.txt. I need to create
> an interface like EditMenu, providing IMenuItemType interface.

Yeah, seems you are right then, getMenuItemType looks for interfaces
implementing an interface.
I've never done that, so I don't know the details of it.
Lennart Regebro: Zope and Plone consulting.
+33 661 58 14 64

More information about the Grok-dev mailing list