hi there, i am still messing around with the most simple thing i can imagine to do with zope: writing and reading properties into and from different objects. so here's my scenario: 1. a folder called "newbie" with a property called "msg" 2. a dtml-document called "test" with a property called "msg" 3. a dtml-method called "write" thanks to kevin dangoor's help i now know how to write a property, generally: <dtml-call "manage_changeProperties ({'msg': 'blablabla'})"> imagine this in 3., the method will write "blablabla" into the property "msg" of the "newbie"-folder. that works. same is with reading the folder's property. no problem. but what if i want to assign the value to the "msg"-property of the document "test" (2.)? kevin suggested: <dtml-with test> <dtml-call "manage_changeProperties ({'test.msg': 'blablabla'})"> </dtml-with> unfortunately, when i replace the code in 3. with this piece, it does not work. resp. i do not get any error, however the property remains untouched. i am pretty confused about this and would appreciate general help about how to set and get properties of an object's parent, sibling and child objects. or someone please might explain to me that my approach is a completely wrong one to the techniques of requesting and updating the zope database (although i think it would be a comfortable one)... best regards, tobi
lethal@innocent.com wrote:
<dtml-with test> <dtml-call "manage_changeProperties ({'test.msg': 'blablabla'})"> </dtml-with>
This is *almost* right. It attempts to change a property of 'test' named 'test.msg'. Since 'test' has no such property, this fails silently. You want: <dtml-with test> <dtml-call "manage_changeProperties ({'msg': 'blablabla'})"> </dtml-with>
well, i was close to assume that it could be like that (i guess, i even tried it accidentally). nevertheless, if i change the line respecting your suggestion, all i get is "blablabla" in the property "msg" of the *folder* called "newbie". i agree with you that it sounds bloody logical and that it *should* work like that. but the "msg" property in the dtml-document "test" still remains the original value. what else could i do wrong???` tobi letha-@innocent.com wrote: original article:http://www.egroups.com/group/zope/?start=10898
lethal@innocent.com wrote:
<dtml-with test> <dtml-call "manage_changeProperties ({'test.msg': 'blablabla'})"> </dtml-with>
This is *almost* right. It attempts to change a property of 'test' named 'test.msg'. Since 'test' has no such property, this fails silently. You want:
<dtml-with test> <dtml-call "manage_changeProperties ({'msg': 'blablabla'})"> </dtml-with>
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Evan Simpson -
lethal@innocent.com