RE: [Zope] Namespace error in MIME/Sendmail
I expected that, Michel. ;) Although I'd already tried it without success, your reply at least nudged me to poke around a bit more, and I discovered that it is the .read() that causes the difficulty. This: <dtml-boundary type=application/octet-stream disposition=attachment encode=base64><dtml-var expr="restrictedTraverse(SendDoc).read()"></dtml-mime> </dtml-sendmail> fails with an attribute error on the read(). I got the read() syntax from the Zope book http://www.zope.org/Members/michel/ZB/AdvDTML.dtml and an archived list message http://lists.zope.org/pipermail/zope/2000-August/116944.html. It appears to be incorrect for this case, though I'll be damned if I know why. For the record, REQUEST.resolve_url still failed with a namespace error when I removed the read(). You've convinced me, I'll use restrictedTraverse from now on! :-)
-----Original Message----- From: Michel Pelletier [mailto:michel@digicool.com] Sent: Wednesday, June 20, 2001 5:53 PM To: Dunigan, Craig Cc: 'Eric Balasbas'; 'zope@zope.org' Subject: RE: [Zope] Namespace error in MIME/Sendmail
Don't use REQUEST.resolve_url. It's depricated and it was pretty dumb to begin with. Use restrictedTraverse, which is documented in the online help system under the 'ObjectManagerItem' API.
-Michel
On Wed, 20 Jun 2001, Dunigan, Craig wrote:
Nope, same result with Methods instead of Documents.
Craig Dunigan Web Programmer Esker Software - Extending the Reach of Information mailto:craig.dunigan@esker.com Ph. 608.273.6000 Fax 608.273.8227 http://www.esker.com
-----Original Message----- From: Dunigan, Craig [mailto:craig.dunigan@esker.com] Sent: Wednesday, June 20, 2001 2:57 PM To: 'Eric Balasbas'; 'zope@zope.org' Subject: RE: [Zope] Namespace error in MIME/Sendmail
There's no compelling reason, so it's worth a try. I'll see what happens.
Craig
-----Original Message----- From: Eric Balasbas [mailto:ebalasba@bway.net] Sent: Wednesday, June 20, 2001 2:52 PM To: Dunigan, Craig Cc: 'zope@zope.org' Subject: Re: [Zope] Namespace error in MIME/Sendmail
Is there a reason that SendMail and MailSender are DTML Documents? Many namespace problems are solved by using DTML Methods instead, although I cannot say for sure that this is the problem here.
Eric Balasbas Senior Developer eric@virtosi.com
http://www.virtosi.com/ Virtosi Ltd. Design -- Branding -- Zope
On Wed, 20 Jun 2001, Dunigan, Craig wrote:
I hit one of those namespace/acquisition kind of things that let me know I'm a long way from achieving the Zope Zen. I want to give users an icon next <snipped the rest>
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
Dunigan, Craig