[ZDP] BackTalk to Document Zope Developer's Guide (2.4 edition)/Zope Products

webmaster@zope.org webmaster@zope.org
Tue, 26 Nov 2002 07:00:56 -0500


A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZDG/current/Products.stx#3-34

---------------

      Note that you cannot restrict which types of containers can
      contain instances of your classes. In other words, when you
      register a class, it will appear in the product add list in
      folders if the user has the constructor permission.

        % Anonymous User - Feb. 10, 2002 9:12 pm - Worse...  I've *LOOKED* in the API reference that can be found from the Zope Help system, and I don't see a mention of ProductRegistrar, nor does "search" find a reference to "registrar".  This is in 2.5.0 Zope.

        % Anonymous User - Apr. 4, 2002 11:47 am:
         To our opinion, registrar is a 'dummy' name for a parameter. It could be context or SantaClaus. The registrar
         parameter contains the context of the object, isn't it.

        % Anonymous User - June 2, 2002 2:00 am:
         A little-known fact.  So little-known, in fact, that I've been unaware of it for three years:

         Adding a "methods" attribute to your Product's __init__.py as a dictionary in the form:

         methods = {'function': function, 'function2': function2}

         Causes the functions to be available as attributes of the root Zope object! This means that they will be
         available anywhere via acquisition, sort of as mini-singletons.
         These functions must accept a single argument, which will be the object from which they are acquired.

         I wish I knew about this a long time ago.

        % Anonymous User - Aug. 9, 2002 8:01 am:
         Another thing, important for readers and maybe a nice thing to mention here would be the visibility=None
         thing, to prevent the product from showing up in the add list. I think it's not described anywhere.

        % Anonymous User - Aug. 9, 2002 8:01 am:
         Another thing, important for readers and maybe a nice thing to mention here would be the visibility=None
         thing, which prevents the product from showing up in the add list. I think it's not described anywhere.

        % to_be - Nov. 26, 2002 7:01 am:
         >>  a nice thing to mention here would be the visibility=None thing
         I agree. It seems to be quite tricky. A good explanation of _implements_ and Interfaces would be nice. By the
         way, does anyone know where I can find documentation regarding this topic?