Dylan Reinhardt wrote:
On 6/23/05, Jim Fulton <[EMAIL PROTECTED]> wrote:
Dylan Reinhardt wrote:
When my content interface *inherits* from an interface, this seems to
work... but when my class *implements* an interface, this appears not
to.
I don't know what you mean.
Perhaps I'm not using the correct terminology. :-)
Here are the two cases:
Case 1 ("implements"):
----------
I have a ZCML directive such as this:
----
<content class=".mycode.MyClass">
<implements
interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
/>
<!--much snipped-->
</content>
----
Case 2 ("inherits").
-----------
I use the following in my interface definition:
----
from something.interfaces import ISomeBase
class IMyClass(ISomeBase):
""" this interface inherits from another one """
----
In case 2, I'm able to use the menuitem ZCML directive to suppress a
menu that's defined by ISomeBase. All good.
In case 1, I can't find a way to suppress the display of the Metadata
tab.... at least not without resorting to a custom template or
wrapping/modifying built-in code. This *seems* like a task for ZCML,
yes?
Does that help clarify the problem I'm seeing?
I think so. So, you don't want to define a new interface that
extends IAttributeAnnotatable.
You should be able to define the menu item for the class.
If you can't I'd consider that a bug. (This bug is not unlikely,
because we may not have gotten around to supporting classes
in menu-item for attriutes.)
Jim
--
Jim Fulton mailto:[EMAIL PROTECTED] Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users