ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <>
Subject Re: [PATCH] Script enhancement to standardize the "project" object exposed
Date Mon, 01 Oct 2001 00:42:09 GMT
Just a couple of quick comments:

- 'this' does not work as that is a pre-defined BSF name, 'this' contains
members of all the objects that places within its context (so it
will contain 'self', and all the other references and properties that have
legal Java identifiers).  'self' is the name I've submitted.

- Thanks for the example where the Task reference comes in handy.


----- Original Message -----
From: "Phil Surette" <>
To: <>
Sent: Sunday, September 30, 2001 4:47 PM
Subject: Re: [PATCH] Script enhancement to standardize the "project" object

> Wow! Step away from my computer for a couple of days and I see
> my suggestion has borne strange fruit!
> I'm new to this list so I guess my vote doesn't count, but I'd
> give a +1 to the 'self' addition if I could... though I think
> Erik said that 'self' did not work. I prefer 'script' to
> 'thisScript' since long, verbose names are not very
> scripty.
> The addition of 'project' is a great improvement over the
> current state of affairs. I'm glad that got through.
> Ideally I'd like to see 'project' and 'this' both, since
> it is the 'project' object you will be working with most of
> the time, and once again having to type script.project
> all over the place is not very scripty.
> I don't think backward compatibility of scripts is a huge
> issue. Scripts will be as backward compatible as regular
> tasks. If you don't want people creating dependencies
> on the Ant API, you shouldn't publish the API in the
> distribution ;)
> Finally, here's a possible valid reason why scripts should be able
> to access their task (easily, since they can do it awkwardly already):
> BuildExceptions. When a script wants to throw a BuildException,
> it should be using the BuildException constructor that
> takes a Task argument.

View raw message