Terry, > I recall that I brought up the float issue well over 6 months > ago and, after a fair amount of discussion on the list, the > idea was of making a float a native feature was rejected. > (And as I recall, it had been brought up previously too, with > the same end result.)
No, the (last) desision has been to introduce correct number handling. BTW, Geir agreed. That's the reason I wrote the Number-Handling-Patch and even improved it (or better fixed it since I forgot something :). I followed all the discussion and was quite involved into it. And I don't try to say "Oh that feature sounds cool" completely out of the blue! I really hope that came through. > There was a *huge* amount of discussion on the whitespace > issue - it was so voluminous that I can't figure out what the > actual outcome was - I thought Geir was adding some feature > related to that. > > The reason I raise these is to highlight that it's not that > they have not been (extensively) considered, or that they've > been overlooked. For better or worse, they were > comprehensively considered and the decision was made not to > include them. Not true for all cases. The main reason some features have not been considered worth implementing was the holy "backwards compatibility"(tm) :) One of the last things Geir did was coming up with the plan of breaking backwards compatibility as of version 1.5 (1.4 should be an interim release containing the features within the HEAD and some backwards compatible enhancements). So we should not stop thinking of improvements that could/need to be done. > Maybe these were decisions that should be revisited, I don't > know. But to get an accurate fix on what's going on, I think > it's important to realize that most or all of them were > deliberately addressed at some point in the past. Of course and you are absolutely right. The whitespace thing for instance is horribly complicated (that's why I like the idea of using some sort of filter-mechanism, btw). But other things like escaping or map-support (everybody on the list really loved that patch :) could be done easier. > A key part of the problem here, IMHO, is that Geir has > shifted from being an incredibly involved leader, to a > virtually non-existent one - which is a huge and > disconcerting shift. For whatever reason he appears to have > opted out. I (and I'm sure many/most others) are grateful > for the tremendous effort that he put into this project. Absolutely no question! > But I'll help in any appropriate way that I can. Me too. That's definitely the right way. If one of the comitters would drop in... Peter > Regards, > > Terry > > ----- Original Message ----- > From: "pero" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, March 03, 2003 1:53 PM > Subject: FW: Running total (more on: Is there a need for further > development) > > > Terry (and everyone else, of course :), > > I think the following thread (which is currently happening > on the user list) demonstrates that there are some _basic_ > things missing. This time it's the lack of Number-Support. > Such things are basicly the reason why I so often tried to > push the development or the discussion. Users can't imagine, > that their template-language would not know anything about > floats, or that #parse'd macros do not function properly or > that macros cannot be overloaded or that whitespace-handling > is so hard... If you are an experienced Velocity-User, then > you probably have written some tools to overcome some of > these "shortcommings". Velocity is good (no question) but it > could be imroved significantly. (i.e. _has to_ IMHO). > > So, any suggestions on how to get the project working again? > Geir, are you still listening? What's you opinion on all that? > > Peter > > > -----Original Message----- > From: pero [mailto:[EMAIL PROTECTED] > Sent: Monday, March 03, 2003 7:40 PM > To: 'Velocity Users List' > Subject: RE: Running total > > > A Tool is nothing but an Object you put into the Context. For > your purpose you could write something like: > > public class MyTotal { > > private float value; > > public void add (double number) { > this.value += number; > } > > public float getValue() { > return this.value; > } > } > > Then simply create an object of it and put it into your > context and use it like (assuming that you put it into the > context under the key 'amt_total'): > > #foreach (... > > ... > > $amt_total.add($row.prior_payment_amount) > > ... > > #end > > And print the value: > > $amt_total.value > > Hope that helps, > > Peter > > ..: Most people refer to the term "Tool" as a set of highly > reusable methods. There is also a Velocity-Tool-Subproject > where people put together some useful tools. Documentation > (not much) can be found under: > http://jakarta.apache.org/velocity/toolsubproject.html > > > -----Original Message----- > > From: Leyzerzon, Simeon G [mailto:[EMAIL PROTECTED] > > Sent: Monday, March 03, 2003 7:26 PM > > To: 'Velocity Users List' > > Subject: RE: Running total > > > > > > Thank you, Peter > > > > What is a Tool? > > > > Is there a reference for it? > > > > Simeon > > > > > > > > -----Original Message----- > > From: pero [mailto:[EMAIL PROTECTED] > > Sent: Monday, March 03, 2003 1:23 PM > > To: 'Velocity Users List' > > Subject: RE: Running total > > > > > > Simeon, > > > > > > > > > > > > > > > The line: > > > > > > > > > > > > > > > > > > > > #set($prior_payment_amt_total = $prior_payment_amt_total + > > $row.prior_payment_amount)## > > > > > > > > > > > > > What is the type of $row.prior_payment_amount? I think it's > a float or > > > > a double. If so, then you cannot do it this way since Velocity can > > only > > > > compute Integer-values (until now). So you'd have to calculate the > > total > > > > within one of your beans or you could use a Tool... > > > > > > > > Sorry for the bad news :( > > > > > > > > Peter > > > > > > > > > > > > > > Thanks. > > > > > > > > > > Simeon > > > > > > > > > > -----Original Message----- > > > > > From: pero [mailto:[EMAIL PROTECTED] > > > > > Sent: Monday, March 03, 2003 12:49 PM > > > > > To: 'Velocity Users List' > > > > > Subject: RE: Running total > > > > > > > > > > > > > > > I do not fully understand your question, but if you add an Integer > > > > > > > > > > to the context it stays an Integer unless you reassign its name > > > > > > > > > > with a String. It would be nice, if you could provide some > > > > > sample code. > > > > > > > > > > > > > > > > > > > > Peter > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > > > > From: Leyzerzon, Simeon G [mailto:[EMAIL PROTECTED] > > > > > > > > > > > Sent: Monday, March 03, 2003 6:46 PM > > > > > > > > > > > To: Velocity Users List (E-mail) > > > > > > > > > > > Subject: Running total > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Is it possible to do a running total on a numeric field in > > > > > > > > > > > the velocity > > > > > > > > > > > template? > > > > > > > > > > > I'm assuming that after the merge everything is just a > > > > > > > > > > > String. How would I > > > > > > > > > > > reconvert the numbers back to do the total? > > > > > > > > > > > Thank you. > > > > > > > > > > > Simeon > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > > > > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > For additional commands, e-mail: > > > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > > > > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > > > > > > > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
