[Zope] Calling ZClass Methods?

Terry terry@taipeitimes.com
Wed, 20 Mar 2002 10:21:25 +0800


Hello,

You can try.

DTML Method:
<dtml-call 
"manage_addProduct['OP'].OPImage.createInObjectManager('the_id_you_want',REQUEST)">

Python Script:
context.manage_addProduct['OP'].OPImage.createInObjectManager('the_id_you_want',context.REQUEST)


Have a nice day

Terry


Dianne Van Dulken wrote:

>Hi, 
>
>I've been trying to do this, but can't get it to work.
>
>I've got a ZClass called OPImages.  Like a normal image, but with some extra
>fields (like alt, etc).  I want to call this not from the drop down list,
>which works fine, but from within a form action method (there are other
>things being called at the same time).  Can anyone explain it to me?
>
>I've tried the following:
>
><dtml-call "OPImage_add(objectname, file, title=thetitle)">
><dtml-call "Products.OP.OPImage_add(objectname, file, title=thetitle)">
><dtml-call "ControlPanel_Products.OP.OPImage_add(objectname, file,
>title=thetitle)">
>
>Plus, all of the above with expr=
>and all with the variables being _.getitem('x')
>
>
>The zope books gives the impression that the first of these should be the
>one that works, but I can't get it to.
>
>Any help would be greatly appreciated!
>
>Di
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists - 
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
>