cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roberto" <rma...@montefiore.ch>
Subject Re: Java methods..
Date Wed, 22 Dec 2004 13:12:44 GMT
Sorry & thanx to everybody...  I hate myself when Im doing this fu@##!!
mistake!!!

----- Original Message ----- 
From: "george georgovassilis" <georgeg@open.gr>
To: <users@cocoon.apache.org>
Sent: Wednesday, December 22, 2004 2:07 PM
Subject: Re: Java methods..


> Hi Roberto
>
> This line really assings a java.lang.String object to 'pippo'
> var pippo = new String();
>
> And this line:
> pippo = "PROVA";
> breaks the assingment again, because "PROVA" is a JavaScript String
> (which is not a java.lang.String object for which the following holds:
> var a = "PROVA";
> var b = new java.lang.String("PROVA");
> where a!=b
> but a.equals(b)
>
> I think pippo.length does the job for JavaScript strings or, you just
> have to do
> var pippo = new String("PROVA");
> G.
>
> Roberto wrote:
>
> > Hi there,
> > I got a little problem I don't get what's wrong in my flowscript...
> >
> > importClass(Packages.java.lang.String);
> > ....
> >
> > function prova(){
> >
> >   var pippo = new String();
> >   pippo = "PROVA";
> >
> >   java.lang.System.out.println("NUMERO:"+pippo.lenght());
> >
> > }
> >
> > But the system gave me back an error telling me that:
> >
> >
> >
> >   An Error Occurred
> >
> > lenght is not a function.
> >
> > Why??
> >
> > Cheers, ROb
> >
> >
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org


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


Mime
View raw message