Many of the bugs are still in there. It is keeping me from 
moving from WM to V. I'm reaching the point where I cannot
continue, since I need VMs.

I detected two more buglet...

* Escaping some reference within a parsed template is not
  respected. Add the follwing line to test/templates/parse.vm
  and parse1.vm and see the difference...
    \$list is a $list.Class.Name with length $list.size()

* More problems with method invocations (also see turbine list
  message "Scheduler") following example does not work:
    #set $foo = $list.set(0, "ArrayList element x")
    Changed first element from "$foo" to "$list.get(0)"

>[snip]
> * A #set with a following comment causes a NPE, e.g:
>   #set $color = "0x8080FF" ## light blue

still there...

>[from another thread to this subject]
> > Currently, the #set is to be kept alone on its own line.
> > 
> > We are going to normalize the set directive :
> >    
> >    #set( expression )
> > 
> > to look like other directives, and then deprecate the current 
> > #set over time.
Such a change would require voting. for me it's -1, even though
my vote doesn't count (yet). I would like to be able to have
all directives standalone each in its own line to keep them 
visually separate from the content (whithout them polluting 
the output - even of the #D's are indented). I don't see a reason 
for embedded #set directives. Well I would agree that if a
#set() is used to create context objects, then a #macro should 
also...

> * A file ending in a ## without an EOL emits a TokenMgrError.

still there...

> * A #set without an "=" emits a NPE instead of an apropiate
>   error message.

still there...

> * The negation in #if ( !$foo ) 

fixed..

> * A method invocation (which is not a getXXX) without parameters
>   requires an empty braket set, else it throws a ClassCastException,
>   e.g. add following line to the example.vm: length=$list.size

still there...

> * A null assignment (e.g. returned from a method call) leaves the
>   variable unchanged, e.g:

still there...
Here a better example for the test templates:

  #set $foo = ""
  The contents of foo after "\#set \$foo = \$list.get(0)" is:
  #set $foo = $list.get(0)
  $foo

  Getting element 5 should return null
  So what's in foo after "\#set \$foo = \$list.get(5)":
  #set $foo = $list.get(5)
  #if ( $foo )
    \$foo should have contained NULL (has "$foo")!
  #else
    $foo is now correctly NULL.
  #end

> 
> * Hastables are known to a foreach, but not to set. The WM syntax
>   #set $provider.Hashtable.NEW_KEY = "a string"
>   does not do anyting. How does one set a value into a Hastable without
>   emitting the previous content? does one need to do:
>   #set $dummy = $provider.Hashtable.put("NEW_KEY", "a string")

still there...

> 
> * Whitespaces around standalone #if, #else, #end are preserved,
>   it should be possible to handle them like a #set
>[snip]
> * Pluggable directives should contain a flag on the interface that
>   states if whitespaces should be removed when these are standalone.
>   A #parse should not touch whitespaches, whereas a #include should

still not there...

> > So directives don't emit the EOL, but they will produce the whitespace
> > on the left.

Why is the following emmitting two EOLs between the output lines?
---
Testing it:
#if ($condition)
    The condition is true!
#else
    The condition is false or is not set!!
#end
---
outputs:
---
Testing it:

    The condition is false or is not set!!
--- 

I would like to be able to have directives standalone each 
in its own line to keep them visually separate from the content 
(whithout them polluting the output - even of these are indented).

> 
> * The current snapshot contains new xalan/xerces which is not
>   compatible with the included JTest.

still there... 'build-velocity.sh test' does not work.

> 
> * The example/test.sh in the current snapshot is referencing
>   velocity-0.4.jar instead of the generated 0.5

fixed.

> 
> * The build-velocity.sh just does a prepare as the default target,
>   I would expect it to do at least a compile and jar (as the
>   install.html states).

fixed.

>[from other mail in the same thread:
> 1. How can I define reference to a string containing a quote: e.g.:
>      #set $width=" width=\"$value.getAttributeValue("width")\""
>    is this escaping within a string possible?
(note that I made a similar question with allowing mixing single
 and double quotes in another thread).

Related to this: are multiline strings possible somehow? e.g.:
#set $xmlString = "<xml>
  <item value='123'>
</xml>"

> 
> Please let me know if I should dig into the code to help out with
> these problems. Maybe it would then be time to obtain CVS write
> permission.

ditto.

> 
> :) Christoph

:) Christoph

Reply via email to