A little demo with the under variable
Since you can say "_['foo']" Shouldn't I be able to say: <dtml-in expr="_"> <dtml-var sequence-item> </dtml-in> Or <dtml-in expr="_.items()"> <dtml-var sequence-item> </dtml-in> Or something like that? Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
Bruce Eckel wrote:
Since you can say "_['foo']"
Shouldn't I be able to say: <dtml-in expr="_"> <dtml-var sequence-item> </dtml-in>
Or
<dtml-in expr="_.items()"> <dtml-var sequence-item> </dtml-in>
Or something like that?
You're right to think that something like this would work. But there's a *lot* of crap in the under mapping... and I don't think it has an items method (it's not an actual dictionary). It would be intuitive to be able to do this (if for some reason it was necessary other than for discovery), but it's not really a feasible exercise due to the implementation underneath it. (of course, every time I think of this thing actually being named "_", I invariably have a good cry and then consult rule 12 of http://mindprod.com/unmain.html hoping that the other rules cheer me up ... ;-) - C
participants (2)
-
Bruce Eckel -
Chris McDonough