Irene Barg <ibarg@as.arizona.edu> writes:
1. You can print the values of sequence-items with:
(index=<dtml-var sequence-index>, number=<dtml-var sequence-number>, item=<dtml-var sequence-item>)
2. To test for equality, this does not:
<dtml-if "sequence-index == 0"> (<dtml-var count-adassnum> Records found) </dtml-if>
3. While this does work: <dtml-if "_['sequence-index'] == 0"> (<dtml-var count-adassnum> Records found) </dtml-if>
I say this is confusing. Don't tell me to read the Namespace How-to, or the Zope User Guides, I did, and it's still confusing! Unless you find an example, that does exactly what you want, trying to figure it out with the documentation available can be difficult. I found my answer to this in the "How-To: (How-to) access the field names and fields of any arbitrary ZSQL query", but it took a lot of searching the Zope site for references to 'dtml-in'. I get so frustrated with DTML, I want to scream. Please don't tell me to buy the Zope book, DTML should be more intuitive. DTML maybe the heart of Zope, but it's also it's achilles heel.
-- irene
------------------------------------------------------------------ Irene Barg Email: ibarg@as.arizona.edu Steward Observatory Phone: 520-621-2602 933 N. Cherry Ave. University of Arizona FAX: 520-621-1891 Tucson, AZ 85721 http://nickel.as.arizona.edu/~barg ------------------------------------------------------------------
_______________________________________________ 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 )
It might be that fixing one or both of the above would reduce the DTML pain factor quite a bit. Certainly, it's time to do whatever it takes to banish these "-"-named variables, IMHO.
Agreed. But DC always raises objections when this is brought up.
Steve Drees wrote:
It might be that fixing one or both of the above would reduce the DTML pain factor quite a bit. Certainly, it's time to do whatever it takes to banish these "-"-named variables, IMHO.
Agreed. But DC always raises objections when this is brought up.
why?! Chris
It might be that fixing one or both of the above would reduce the DTML pain factor quite a bit. Certainly, it's time to do whatever it takes to banish these "-"-named variables, IMHO.
I agree, changing the "-" to "_" would remove a whole ton of posts on this list and mean I could chop a whole bunch of <dtml-let item=sequence-item>. I really only see negative reasons for a "-". -- Andy McKay, Developer. ActiveState.
From: Andy McKay
It might be that fixing one or both of the above would reduce the DTML pain factor quite a bit. Certainly, it's time to do whatever it takes to banish these "-"-named variables, IMHO.
I agree, changing the "-" to "_" would remove a whole ton of posts on this list and mean I could chop a whole bunch of <dtml-let item=sequence-item>. I really only see negative reasons for a "-".
For once I will send a "me too" to the list. "sequence-item" is a simple and plain design error. Decapricate it and and let us use "sequence_item" etc. together with the other for a while and then drop the old form. It is the single most annoying thing in dtml, and as far as I can see in the source it should be trivial to give all those sequence-* a sequence_* name also. Regards Max M Max M. W. Rasmussen, Denmark. New Media Director private: maxmcorp@worldonline.dk work: maxm@normik.dk ----------------------------------------------------- Specialization is for insects. - Robert A. Heinlein
[Max M.] | For once I will send a "me too" to the list. "sequence-item" is a simple and | plain design error. Decapricate it and and let us use "sequence_item" etc. | together with the other for a while and then drop the old form. I'd like to join this mob. ;) It's painful and ugly to use "_['sequence-item']", "_['sequence-index']" etc... -Morten
On Sat, 11 Nov 2000, Andy McKay wrote:
It might be that fixing one or both of the above would reduce the DTML pain factor quite a bit. Certainly, it's time to do whatever it takes to banish these "-"-named variables, IMHO.
I agree, changing the "-" to "_" would remove a whole ton of posts on this list and mean I could chop a whole bunch of <dtml-let item=sequence-item>. I really only see negative reasons for a "-".
I've tried starting this call some time ago, but it never managed to pick up steam. Last time, however, someone pointed to an existing patch to do just that: change *-* variable names to *_* . If only I could remember where it was... Have a better one, Curtis Maloney
participants (7)
-
Andy McKay -
Chris Withers -
Curtis Maloney -
Max M -
morten@esol.no -
Simon Michael -
Steve Drees