Re: [Zope] Calling objects with arguments in a sequence

2000-09-29 Thread Dieter Maurer

Tres Seaver writes:
 > You were very close -- the trick here is that 'objectValues' returns
 > real objects, not IDs.  Try this (untested)::
 > 
 >   
 > 
 > 
 >
 >   
This, probably, will not work, as *ALL* name arguments (as e.g.
in )
call the object, if it is callable.

You can use "_.getitem('sequence_item')" to get an object itself
and not the result of calling the object.


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Calling objects with arguments in a sequence

2000-09-27 Thread Tres Seaver

seb <[EMAIL PROTECTED]> wrote:
> 
> I'm using the Photo product, instances of which I can call, with
> arguments, like this:
> 
> 
> 
> However, I can't work out how to pass arguments to each sequence item
> when iterating over a sequence.
> 
> For example, I've tried:
> 
> 
> 
> 
> 
> (..not that I expect that to work :)
> 
> And I get
> 
> Error Type: TypeError
> Error Value: call of non-function (type string)
> 
> I've tried various combinations of ways of calling the sequence-item,
> but they all return the same error.  Could anyone suggest how I should
> do this?  Thanks in advance...

You were very close -- the trick here is that 'objectValues' returns
real objects, not IDs.  Try this (untested)::

  


   
  

Tres.
-- 
===
Tres Seaver[EMAIL PROTECTED]
Digital Creations "Zope Dealers"   http://www.zope.org

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Calling objects with arguments in a sequence

2000-09-27 Thread seb

Hi

I'm using the Photo product, instances of which I can call, with
arguments, like this:



However, I can't work out how to pass arguments to each sequence item
when iterating over a sequence.

For example, I've tried:





(..not that I expect that to work :)

And I get

Error Type: TypeError
Error Value: call of non-function (type string)

I've tried various combinations of ways of calling the sequence-item,
but they all return the same error.  Could anyone suggest how I should
do this?  Thanks in advance...

Seb

___
Zope maillist  -  [EMAIL PROTECTED]
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 )