I think so, I am using a url http://localhost:8080/notes/Notes/NewNote The counter is a property of the Notes folder and the NewNote python script is in the notes directory. Would I be right in thinking that I use n=context.counter Cos if I do it works, if I kick out the context ie n=counter zope bletches Thanks David Kyte -----Original Message----- From: Dieter Maurer [mailto:dieter@handshake.de] Sent: 14 February 2002 21:59 To: David Kyte Cc: Trevor Toenjes; Bakhtiar Abdul Hamid; zope@zope.org Subject: RE: [Zope] manage_changeProperties self help David Kyte writes:
I have a similar problem - except using a python script. The counter property is in the paren folder.
n = context.counter n=n+1 context.manage_changeProperties( counter=n )
context.manage_addDocument( 'N' + str(n) , '' )
return RESPONSE.redirect( 'MainNotes' ) And you are sure, that "context" is the object with "counter" as property?
If this is not the case, then you can get "counter" by acquisition, but "manage_changeProperty" may come from another object without a "counter" property. I can assure you: "manage_changeProperties" usually works as it should... Dieter