reading an array's length?

2005-03-18 Thread Christofer 'boz' Jennings
I want to get an array's length wit VTL, but $mayArray.length doesn't work. How s it done? Thanks! ,boz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: reading an array's length?

2005-03-18 Thread Steve O'Hara
: reading an array's length? I want to get an array's length wit VTL, but $mayArray.length doesn't work. How s it done? Thanks! ,boz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Re: reading an array's length?

2005-03-18 Thread Christofer 'boz' Jennings
; http://wiki.apache.org/jakarta-velocity/ArrayTool Steve -Original Message- From: Christofer 'boz' Jennings [mailto:[EMAIL PROTECTED] Sent: 18 March 2005 15:07 To: velocity-user@jakarta.apache.org Subject: reading an array's length? I want to get an array's length wit VTL

Re: reading an array's length?

2005-03-18 Thread Christofer 'boz' Jennings
Subject: reading an array's length? I want to get an array's length wit VTL, but $mayArray.length doesn't work. How s it done? Thanks! ,boz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Re: reading an array's length?

2005-03-18 Thread Mike Kienenberger
Christofer 'boz' Jennings [EMAIL PROTECTED] wrote: Is there a binary for ArrayTool somewhere or do I just build it? And how would it get configured programmatically (eg. velocity.setProperty())? It's included with the latest (cvs) Velocity tools, I think. It's also available on the

Re: reading an array's length?

2005-03-18 Thread jian chen
Hi, I also used Array Tool before. However, looking at the source of it, it appears to me that every time you call a method of the Array tool, it creates a new instance of the array list internally, which is mild performance problem. So, now I tried to avoid using it. What I did is to use

Re: reading an array's length?

2005-03-18 Thread Shinobu Kawai
Hi Mike, Is there a binary for ArrayTool somewhere or do I just build it? It's included with the latest (cvs) Velocity tools, I think. Not yet. I'm going to get the List support back first. ## svn, BTW ;) Best regards, -- Shinobu -- Shinobu Kawai [EMAIL PROTECTED]

Re: reading an array's length?

2005-03-18 Thread Shinobu Kawai
Hi Jian, I also used Array Tool before. However, looking at the source of it, it appears to me that every time you call a method of the Array tool, it creates a new instance of the array list internally, which is mild performance problem. The current version uses reflection, so shouldn't be

Re: reading an array's length?

2005-03-18 Thread Christofer 'boz' Jennings
Ahh. Now I get tools So simple :-) Dummied the ArrayTool down to just what I need. Later it can be swapped for the real thing I guess. Herre's what I did //- start snip package mystuff; import java.lang.reflect.Array; public class VelocityArrayTool { /**

Re: reading an array's length?

2005-03-18 Thread Mike Kienenberger
Christofer 'boz' Jennings [EMAIL PROTECTED] wrote: Ahh. Now I get tools So simple :-) Yeah, that's exactly how I felt. It just took me a lot longer to figure it out. Wonderfully brilliant yet simple idea once you realize that there's nothing special about a tool. :)

Re: reading an array's length?

2005-03-18 Thread Boz
And its nice to use something that makes me say ahh instead of argh! :-) ,boz On Mar 18, 2005, at 6:09 PM, Mike Kienenberger wrote: Christofer 'boz' Jennings [EMAIL PROTECTED] wrote: Ahh. Now I get tools So simple :-) Yeah, that's exactly how I felt. It just took me a lot longer to