[Zope] Another newby question about referring to the value of variables

John Grey john.grey at sunderland.ac.uk
Mon Jan 26 08:13:47 EST 2004


Hi,

First , thanks for everyone's help with my last two queries which
solved the questions I had perfectly - I hope you can bear with me
for one more...

I am now trying to create a simple product which clones a
tinytableplus.  I have set it up similarly to the zoo exhibit example
in the Zope book.

apart from the stuff to redirect back, the add script includes only

  newgrid=context.manage_clone(container[source],id)

where 'source' is a parameter passed from an 'add form' to determine
which of several tinytables to use (these are in the product folder).

This works if I try to add the product to the product folder itself
by viewing and submitting the add form that calls the script but when
I try to use the normal add product drop down list I get this error:

  Error Type: AttributeError
  Error Value: __getitem__

Everything works OK if I substitute the actual name of a tinytable
(preceded by .) like this.

    newgrid=context.manage_clone(container.grid,id)

I'd be very grateful for any ideas,  thanks , John

--
   J o h n   G r e y
   http://j-grey-pc.sunderland.ac.uk

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





More information about the Zope mailing list