Re: [Zope-dev] This was fun!!!
From: "Joachim Werner" <[EMAIL PROTECTED]> > DTML looks at "getEasyLanguageService" and does an implicit > "getEasyLanguageService()". So now "getEasyLanguageService" (as an attribute > in the DTML namespace) represents the actual service object the method > should return. Bingo! You pinpointed both the bug, and the reason why the first code worked even though the code was syntactically bogus. :-) Full score! I was confused for a whole minute until Johan pointed out the error. I was of course, as always, concentrating on the place where I did the change and the place where the error appeared. That is usually where the bug is. :-) Best Regards Lennart Regebro, Torped http://www.easypublisher.com/ ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] This was fun!!!
This is actually well documented by Dieter, see the second Note of http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html#c37ac15c14b4b5b2 Florent In article <000701c27464$06aabe80$[EMAIL PROTECTED]> you write: > Here was a fun error I had. Try and figure out where the bug is! > > I had this dtml-code: > > > > > html_quote> > > > > > This worked fine. I then changed it to this: > > > > > html_quote> > > > -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:[EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] This was fun!!!
I won't look into the DTML Parser code right now. Don't need no headache ;-) But this is my first guess: > > DTML looks at "getEasyLanguageService" and does an implicit "getEasyLanguageService()". So now "getEasyLanguageService" (as an attribute in the DTML namespace) represents the actual service object the method should return. > > ELS represents the service object now > > > > > getEasyLanguageService() is called explicitly, and in the "", so DTML does no magic. It does NOT put the returned service object into the namespace as "getEasyLanguageService" (as it would do in the first example) > > the method "getEasyLanguageService", not its return value (i.e. the language service object) is passed to ELS > > > > http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] This was fun!!!
Here was a fun error I had. Try and figure out where the bug is! I had this dtml-code: This worked fine. I then changed it to this: Now this fails, and it fails in: with an "function attributes not accessible in restricted mode" error! Now, where is the bug? :-) First answers get 5 ZopeZen coolness credit points. An explanation to why the first version works gets 100 points! :-) Best Regards Lennart Regebro, Torped http://www.easypublisher.com/ ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )