> From: Stefan Bodewig [mailto:[EMAIL PROTECTED]
>
> On Mon, 8 Mar 2004, Dominique Devienne <[EMAIL PROTECTED]> wrote:
>
> > file = project.resolveFile("@{file}");
> ...
>
> > In the <last-modified> macro, when called from the other macro,
> > the file attribute has lost of its back-slashes '\'...
>
> Because it lives inside a JavaScript string and JavaScript uses
> backslashes as escape characters. <macrodef> is only doing a textual
> replace.
What I don't understand is that the first macro I listed works
when used directly (i.e. when that macro is not used within another
macro). So I suspect it's the macro-within-macro has something to
do with it.
I haven't tried, but I'm pretty sure if I was to implement that
<last-modified> macro into a Java task, things would work as expected
which is why again I suspect <macrodef> to have something to do with
it... But of course I've been known to be wrong ;-)
> Turn
> > <property name="@{name}.dest"
> > location="${helpzips}/[EMAIL PROTECTED]" />
>
> into
>
> <property name="@{name}.dest"
> value="${helpzips}/[EMAIL PROTECTED]" />
>
> It won't hurt since you are using project.resolveFile anyway and you
> don't have any backslashes in the string - unless the expanded
> helpzips property contains some.
It doesn't, which is why I used location. @{name}.dest is not used
only by the <last-modified> macro. --DD
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]