You've got some bad syntax.
Try
#set( $array = ["foo", "bar", "blah"] )
This works with the latest version from the source code server. Anyone tried this with 1.4?
WILL
----- Original Message ----- From: "Greg Wolfe" <[EMAIL PROTECTED]>
To: <velocity-user@jakarta.apache.org>
Sent: Monday, January 24, 2005 1:29 PM
Subject: multi-line directives (again)
Hi,
I'm trying to get multi-line directives to work in velocity.
Is see the following post from 2002: http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]&msgNo=7095
It looks like this feature never made it into velocity.
Why can't I do:
#set( $array = "foo", "bar", "blah" )
or
#set( $notSupported1 = "spanning multiple\ lines")
Is there an approved workaround? The (ugly) workaround I've been using for now allows me to break string constants accross multiple lines by embedding velocity comments and backslashes into them.
Some examples of this:
#set( $sample1 = "the great spa##\ nner") ## note that this line must start on the first column of the file!
or
#set( $sample2 = "I span #*\ *#wide spaces") ## note that the whitespace was in a comment
or #set( $sample3 = "I span #*\ in a comment here\ *#wider spaces")
Thanks, -Greg Wolfe
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]