Jose Alberto Fernandez wrote:

I like <define/> as it is short, and it does not make any assumption
about the usage of the name. (Notice that the name can be used for a
property
but can as well be used for a reference or something else.

So, the original example would look like:

<macrodef name="show_length">
  <attribute name="filename">
  <define name="local-prop"/>
  <sequential>
     <length file="@{filename}" property="@{local-prop}"/>
     <echo>The length of file '@{filename}' is [EMAIL PROTECTED]</echo>
  </sequential>
</macrodef>

OK, can the person applying the patch for the local properties also
apply
my patch with the corresponding modifications in the name?


I can do that.
Is "define" a good name ?


Peter

Otherwise, I will need to dig it out from home since I do not have it
at hand from work.

Let me know it you prefer me to apply it.

Cheers,

Jose Alberto



-----Original Message-----
From: Peter Reilly [mailto:[EMAIL PROTECTED] Sent: 11 January 2005 15:41
To: Ant Developers List
Subject: Re: local properties



Jose Alberto Fernandez wrote:



From: Peter Reilly [mailto:[EMAIL PROTECTED]





Wouldn't mind having the two, and see what works best. :-)






Sounds good, but is it possible to get a different name than "let" ?





Hey, just propose a name for it. I am flexible... :-)





Stefan's suggestion of "defvar" or "define-property" is on the correct lines.
Perhaps "defineproperty name='name'" to define a property name accessed by @{name} or
[EMAIL PROTECTED] to get the value.
and "localproperty name='name'" to define a local property accessed by name or ${name} to
get the value.


(the - in the orginal "local-property" suggestion will only work for typedefed tasks and not
for nested elements discovered by Introspection).


Peter



Jose Alberto

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to