[Zope] manage_changeProperties from Python, using ZClass instance located through ZCatalog

Dieter Maurer dieter@handshake.de
Wed, 26 Sep 2001 21:48:52 +0200 (CEST)


Milos Prudek writes:
 > > However, the following script does not change the value of m_id
 > > property. It runs as if everything is ok. It finds correct instance
 > > 
 > > x=context.Catalog_Org(title="aaa")
 > > print x[0].m_id
 > > print x[0].title
 > > new_m_id=[999,888,777]
 > > x[0].manage_changeProperties(m_id=new_m_id)
 > > print x[0].m_id
 > 
 > OK, that was stupid of me. "x" is metadata, not an instance. I need to
 > run the manage_changeProperties on the instance. But how can I construct
 > this call? I know the title of the instance, and I can find the id of
 > the instance...
Yet another person that does not read my replies carefully :-(

  As I told you, from Zope 2.3.3 on, the object returned from
  a catalog search has a method "getobject" (or some similar
  spelling) to get the object itself....

  There is an article at "zope.org".

  I think, I wrote about it in

    <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>

  and, indeed, I can look it up there.
  But, of course, it is your and not my problem.....



Dieter