[Zope] Using string.split() on a DTML method
Jim Cain
jec@mgmt-inc.com
Sat, 09 Oct 1999 21:04:00 -0400
I have a DTML method, category_list_cookie, which returns a string of
colon-separated values I use elsewhere. I would like to split this into a
list so I can use something like phred.count('whatever') to see if this
value is present.
However, when I do something like:
<dtml-with "_.namespace(var1=_.string.split(category_list_cookie, ':'))">
I get this error:
Error Type: TypeError
Error Value: argument 1: expected read-only character buffer,
ImplicitAcquirerWrapper found
Even with something like this:
<dtml-with "_.namespace(var1=category_list_cookie)">
<dtml-call "REQUEST.set('var2', _.string.split(var1, ':'))">
the split method gives the same error. Is var1 in the second example merely
a reference to category_list_cookie, so that I get the same error? Whether
or not this is the case, what does the error mean and how do I fix it?
Cheers,
Jim