ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: setLevel on echo task in JavaScript
Date Tue, 01 Mar 2005 22:47:06 GMT
> From: Shatzer, Larry [mailto:Larry.Shatzer@MIROtechnologies.com]
> > From: Dominique Devienne [mailto:DDevienne@lgc.com]
> > importClass(Packages.org.apache.tools.ant.taskdefs.Echo.EchoLevel);
> > info = new EchoLevel();
> > info.setValue("info");
> >
> > echo = project.createTask("echo");
> > echo.setLevel(info);
> > echo.setMessage("test message");
> > echo.perform();
> 
> With that I get: ReferenceError: "EchoLevel" is not defined.

I guess it's because it's an inner class (even a static one).
I find JavaScript quirky quiet often ;-)

Maybe importClass(...Echo);
With info = new Echo.EchoLevel();

Would have worked better.

> So I used this instead:
> 
> info = Packages.org.apache.tools.ant.taskdefs.Echo.EchoLevel();
> info.setValue("info");

Thanks for sharing. I didn't know you could skip the new!

Live and learn ;-) --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message