[Zope] External Method - "context" arg /makeThumbnails

Arno Gross arno.gross@consotec.de
Thu, 15 Feb 2001 12:20:53 -0100


I just solved this mistake. Here is the makeThumbnails Python Script:
for image in context.objectValues('Image'):  
           if not image.hasProperty('original_id'):                
                context.makeThumbnail(context,image.getId())
The context paramter was missing.
Best regards
   Arno Gross, email: arno.gross@consotec.de

On Thu, 15 Feb 2001, Tom Sheffler wrote:
>The Zope book chapter "Advanced Zope Scripting" shows a method with
>an arg list like this:
> 
>   def makeThumbnail(context, original_id, size=128):
>            
>When I create a method with the "context" arg, Zope complains
>that the parameter "context" was omitted from the request.
> 
>THE REAL QUESTION:::
> 
>Using a Python Method, it's easy to get the variables
>"context"  and "travers_subpath."  How do I get these two
>values when using an External Method.
> 
>Thanks for any assistance.
>Tom