ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <jalbe...@cellectivity.com>
Subject RE: local properties
Date Wed, 12 Jan 2005 12:01:02 GMT
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 ${@{local-prop}}</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?

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:peterreilly@apache.org] 
> Sent: 11 January 2005 15:41
> To: Ant Developers List
> Subject: Re: local properties
> 
> 
> Jose Alberto Fernandez wrote:
> 
> >>From: Peter Reilly [mailto:peterreilly@apache.org]
> >>
> >>    
> >>
> >>>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
> ${@{name}} 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: dev-unsubscribe@ant.apache.org
> >For additional commands, e-mail: dev-help@ant.apache.org
> >
> >
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
> 
> 

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


Mime
View raw message