You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Greg Weinger <gw...@mii.ucla.edu> on 2004/07/22 18:28:38 UTC

[RE] simple flowscript array question

Oliver,

Thanks.  I've tried this, and get the same exception.  None of the 
references seem to apply.  It is possible to create a **JAVA** array, using:

   var = Packages.java.lang.reflect.Array.newInstance(Class,number);

But the standard javascript syntax throws errors.

I'm using cocoon 2.1.5 flowscript.  Does anyone get this same error?

> Hi Greg,
> 
> What about
> var array = new Array(3);
> 
> http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/array.html#1193137
> 
> --
> Olivier Billard
> 
> Greg Weinger wrote:
>> Hi,
>> 
>> I am simply trying to create a javascript array in flowscript.  The wiki 
>> and docs are peppered with such examples:
>> 
>>   var array = ["one","two","three"];
>> 
>> Or:
>> 
>>    var array = Array(3);
>>    array[0] = "blah";
>> 
>> For me, trying to create the array throws a:
>> 
>> org.mozilla.javascript.EvaluatorException:    
>> file:/home/knoppix/workspace/DataServer_v2_1/build/webapp/admin/flow/model.js", 
>> line 154: Java constructor for "java.lang.reflect.Array" with arguments 
>> "number" not found
>> 
>> 
>> It looks like it's trying to create a java array, instead of a 
>> javascript array.  Can I force it to create a javascript array?
>> 
>> 
>> What on earth am I doing wrong?  Has something changed?
>> 
>> Thanks,
>> Greg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org