commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr. <ge...@adeptra.com>
Subject Re: [JAXL & JELLY] size() behavior question
Date Tue, 04 Mar 2003 12:57:08 GMT

On Friday, February 28, 2003, at 01:50 PM, Mark R. Diggory wrote:

> On a related size() note: I've been noticing the following problem.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <jelly xmlns="jelly:core">
>     <new var="test" className="java.util.ArrayList"/>
>     <new var="foo" className="java.lang.String"/>
>     ${test.add(foo)}
>
>     <!-- this works -->
>     ${size(test)}
>
>     <!-- this doesn't work -->
>     <!-- ${test.size()} -->
> </jelly>
>
> Seems that ${test.size()} is a legitimate method call on a ListArray 
> object like ${test.add(foo)} but doesn't work because size() is being 
> reserved for the ${size(test)} function. Couldn't there be a "check" 
> to see if the size() method is actually supported by the object before 
> rejecting it?

It's a bug I'm tangling with.  I just have to re-do how reference-like 
things are handled, and then decide if it's an internal function or a 
method on a reference.

geir

-- 
Geir Magnusson Jr                                   203-956-2604(w)
Adeptra, Inc.                                       203-247-1713(m)
geirm@adeptra.com


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message