I tried following one of the Zope Book examples to no avail.

>From the scripting chapter:

"Since Python Methods are bound the Zope objects, you can get access to Zope
objects via the context parameter. For example, this methods returns the
number of objects contained by a given Zope object:

        Method id: numberOfObjects

            return len(context.objectIds())"

I just get a Name Error on context and if I add context as a parameter I
just get told that the parameter was omitted from the request.  This works,

        Method id: numberOfObjects
        Parameters: self

            return len(self.objectIds())

Am I missing something?  Is this because Amos and Michel seem to be using
2.2.3 and I'm using 2.2.2?


Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to