From: Chris Withers [EMAIL PROTECTED]
dtml-call "REQUEST['where'][-1].manage_addFolder(id)"
Error Type: TypeError
Error Value: read-only character buffer, Python Method
Looks like the 'id' of something along the line is a method rather than a
string. Try "_.getitem('id', 1)".
Cheers,
Evan,
Thanks, that worked...
Evan Simpson wrote:
From: Chris Withers [EMAIL PROTECTED]
dtml-call "REQUEST['where'][-1].manage_addFolder(id)"
Error Type: TypeError
Error Value: read-only character buffer, Python Method
Looks like the 'id' of something along the line is a method
Chris Withers wrote:
Can someone please tell me why folder.id is a method and
everything-else.id is a string?
Sorry, that should be folder.id is a string and everything-else.id is a
method.
cheers,
Chris
___
Zope-Dev maillist - [EMAIL PROTECTED]
Interesting commentary from the Interfaces Wiki:
http://www.zope.org/Members/michel/Projects/Interfaces/ObjectM
anagerItem
"""Some old objects provide id methods that return ids. This practice
should be avoided for new objects. We can't change the old objects for
backward compatability
Chris Withers writes:
I'm trying to do a tree walk and copy with:
dtml-in objectValues
dtml-call "REQUEST['where'][-1].manage_addFolder(id)"
Created dtml-var id in dtml-var "REQUEST['where'][-1].id"BR
dtml-if "meta_type=='Folder'"
dtml-call "REQUEST['where'].append(this())"