ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Kohler" <koh...@cms.tecmath.de>
Subject RE: How to access the current project from javascript ?
Date Tue, 30 Oct 2001 15:02:07 GMT

Hi, 
Thanks for all the hints. 
This should solve the problem. 

Regards,
Markus
> -----Original Message-----
> From: Paul Perevalov [mailto:pperevalov@cyber-asp.com]
> Sent: Tuesday, October 30, 2001 3:14 PM
> To: Ant Users List; kohler@cms.tecmath.de
> Subject: RE: How to access the current project from javascript ?
> 
> 
> Try this:
> 
> <target name="doSomething">
>   <script language="javascript"> <![CDATA[
>     project = doSomething.getProject();
>     fail = project.createTask("fail");
>     fail.setMessage("Error.");
>     fail.execute();
>   ]]></script>
> </target>
> 
> Paul Perevalov
> Bridium
> 
> -----Original Message-----
> From: Markus Kohler [mailto:kohler@cms.tecmath.de]
> Sent: Tuesday, October 30, 2001 5:21 AM
> To: 'Ant Users List'
> Subject: RE: How to access the current project from javascript ?
> 
> 
> Hi,
> 
> > -----Original Message-----
> > From: Don Taylor [mailto:donald_l_taylor_jr@yahoo.com]
> > Sent: Monday, October 29, 2001 6:28 PM
> > To: Ant Users List; kohler@cms.tecmath.de
> > Subject: Re: How to access the current project from javascript ?
> >
> >
> > Just use the project's name you specified in the name attribute. The
> > object of that name is your current project.
> >
> 
> I know,but this is not what I wanted.
> What I want is to write scripts that can be reused within different
> projects.
> 
> This doesn't work when I specify the project name.
> 
> The only way it could work is to make  a new project for the 
> scripts and
> then call the
> scripts explicitly. This solution doesn't feel naturally to 
> me and as far as
> I understand it would not allow me to set values within the script.
> 
> I anyway do not understand, why I have to specify the 
> projectname within the
> scripts just to get the value of some property. Can someone 
> enligthen me
> what the advantage of this design
> decision is ?
> 
> 
> Thanks,
> Markus
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>



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


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


Mime
View raw message