[Zope] objectValues(meta_type) in python script
Gitte Wange
gitte@mmmanager.org
24 Oct 2001 12:50:57 +0200
ons, 2001-10-24 kl. 12:47 skrev Philippe Jadin:
> > But this doesn't work:
> >
> > for item in memberfolder.objectValues('MMM Shop Shopping Cart'):
> > shopping_cart = context.getId()
> >
> > return shopping_cart
> >
> > Now I expected to recieve a string containing 'Shopping Cart', but I
> > recieved a string containing 'CD001' which is a product, not a shopping
> > cart.
> >
> > Doesn't objectValues() work in python scripts ?
>
> if it's :
>
> for item in memberfolder.objectValues('MMM Shop Shopping Cart'):
> shopping_cart = item.getId()
>
> return shopping_cart
>
> then I can consider I'm no more a "newbie" ;-)
>
> context is not changed by the for in loop or is it ?
>
> If it doens't work, send me hate mail ;-)
>
>
> Philippe
Well I just discovered that .... damn me :-)
but then the object itself is just item ?
And the object's id must by item.getId() ...
I'm learning :-)))
(You need to think different when doing things in a PythonScript, that
you usually do i dtml) ...
Gitte Wange