Hi! I have a problem with dtml and the docs won't help me out: i want to call e.g. manage_edit on a dtml document. the document's id is stored in the variable doc_id (e.g.). how do i call the function? <dtml-call "_['doc_id'].manage_edit(_['doc_src'], _['doc_title'])"> doesn't work, as zope treats _['doc_id'] as a string and complains that it can't call manage_edit on a string. what's the correct code? thanks in advance! regards, Klaus -- Klaus Herrmann <klaus.herrmann@goelz.com> Goelz & Schwarz GmbH, Munich www.goelz.com phone:+49 - (0)89 - 544 67 0 22 fax: +49 - (0)89 - 544 67 0 10
On 15 Feb 2001, Klaus Herrmann wrote:
<dtml-call "_['doc_id'].manage_edit(_['doc_src'], _['doc_title'])">
doesn't work, as zope treats _['doc_id'] as a string and complains that it can't call manage_edit on a string. what's the correct code?
<dtml-call "_.getitem('doc_id', 0).manage_edit(_['doc_src'], _['doc_title'])"> Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
On 15 Feb 2001, Klaus Herrmann wrote:
<dtml-call "_['doc_id'].manage_edit(_['doc_src'], _['doc_title'])">
doesn't work, as zope treats _['doc_id'] as a string and complains that it can't call manage_edit on a string. what's the correct code?
<dtml-call "_.getitem('doc_id', 0).manage_edit(_['doc_src'], _['doc_title'])">
already tried that, too. so success, exactly the same problem :-( Klaus -- Klaus Herrmann <klaus.herrmann@goelz.com> Goelz & Schwarz GmbH, Munich www.goelz.com phone:+49 - (0)89 - 544 67 0 22 fax: +49 - (0)89 - 544 67 0 10
On 15 Feb 2001, Klaus Herrmann wrote:
<dtml-call "_.getitem('doc_id', 0).manage_edit(_['doc_src'], _['doc_title'])">
already tried that, too. so success, exactly the same problem :-(
<dtml-call "_.getitem(doc_id, 0).manage_edit Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
<dtml-call "_.getitem(doc_id, 0).manage_edit
same difference, still. :-( something really weird is happing over here... Zope Error Zope has encountered an error while publishing this resource. Error Type: AttributeError Error Value: 'string' object has no attribute 'manage_edit' i just don't get it :-( Klaus -- Klaus Herrmann <klaus.herrmann@goelz.com> Goelz & Schwarz GmbH, Munich www.goelz.com phone:+49 - (0)89 - 544 67 0 22 fax: +49 - (0)89 - 544 67 0 10
Hi! On 20 Feb 2001, Klaus Herrmann wrote:
<dtml-call "_.getitem(doc_id, 0).manage_edit
Error Type: AttributeError Error Value: 'string' object has no attribute 'manage_edit'
Oops :( That strange. Let us continue debugging, if don't mind and not in haste. What will be an HTML source for the call <dtml-var "_.getitem(doc_id, 0)"> ? I hope to see something like <DTMLDocument instance ar 87676546754> Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
Klaus Herrmann wrote:
<dtml-call "_.getitem(doc_id, 0).manage_edit
same difference, still. :-( something really weird is happing over here...
what does: <dtml-var doc_id html_quote><BR> <dtml-var "_.getitem(doc_id, 0)" html_quote> ...give you? cheers, Chris
On Tue, 20 Feb 2001 15:18:00 +0000, Chris Withers said:
Klaus Herrmann wrote:
<dtml-call "_.getitem(doc_id, 0).manage_edit
same difference, still. :-( something really weird is happing over here...
what does: <dtml-var doc_id html_quote><BR> <dtml-var "_.getitem(doc_id, 0)" html_quote>
....give you?
ok i fixed it. sorry for annoying you :-/ made some mistake in another script calling this script -> error :-( now it's working just fine thanks! Klaus -- Klaus Herrmann <klaus.herrmann@goelz.com> Goelz & Schwarz GmbH, Munich www.goelz.com phone:+49 - (0)89 - 544 67 0 22 fax: +49 - (0)89 - 544 67 0 10
[Klaus Herrmann] | <dtml-call "_['doc_id'].manage_edit(_['doc_src'], _['doc_title'])"> I wonder if this wouldn't work: <dtml-call "_[doc_id].manage_edit(_[doc_src], _[doc_title])"> Hm?
I wonder if this wouldn't work:
<dtml-call "_[doc_id].manage_edit(_[doc_src], _[doc_title])">
Hm?
no, exactly the same :-( -- Klaus Herrmann <klaus.herrmann@goelz.com> Goelz & Schwarz GmbH, Munich www.goelz.com phone:+49 - (0)89 - 544 67 0 22 fax: +49 - (0)89 - 544 67 0 10
participants (4)
-
Chris Withers -
Erik Enge -
Klaus Herrmann -
Oleg Broytmann