ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Rich" <billr...@attglobal.net>
Subject RE: Propostion for improving PropertyFileInputHandler
Date Thu, 28 Oct 2004 15:33:20 GMT
This example points out a failure in the way the prompts are stated and not
in using the prompt as a key. In the example the two prompts are exactly the
same. I would assume that I would respond with the exact same value to both
of the prompts because that is what I am asked for.

If the interface wants both the user's first name and last name then the
prompts should be "Enter your first name" and "Enter your last name". If
this is true then the prompt is adequate for the properties file. If the
same value is wanted in both properties then I don't understand the example.

Thanks.  Bill 

Bill Rich
Wilandra Consulting LLC
1325 Addiewell Place
San Jose, CA  95120-3905
phone:      +1 408 268-2452
mobile:     +1 408 410-9713
Santa Cruz: +1 831 464-9007
fax:        +1 413 669-9716
bill@wilandra.com
http://www.wilandra.com

-----Original Message-----
From: Ivan Ivanov [mailto:rambiusparkisanius@yahoo.com] 
Sent: Thursday, October 28, 2004 3:32 AM
To: Ant Users List
Subject: Re: Propostion for improving PropertyFileInputHandler

Something more,

nothing prevents us from this situation:
<target name="input" description="Enter two names">
    <input message="Enter your name"
addproperty="name.1">
    <input message="Enter your name"
addproperty="name.2">
</target>

So we have same prompts and there is no way distinguish them as keys in
properties file (which are should be unique) and property names give us more
"uniqueness" as properties are immutable.
In short, using prompt as a key, opens too many traps and holes.

--- Ivan Ivanov <rambiusparkisanius@yahoo.com> wrote:

> Hi Stefan,
> --- Stefan Bodewig <bodewig@apache.org> wrote:
> > 
> > No, you create it as
> > 
> > #inputp.properties
> > Enter\ Your\ Name=Rambius Parkisanius
> > 
> > At least for JDK > 1.1.
> 
> I didn't knew that. However, I think I will use -propertyfile option, 
> because in my custom task (i am writng ant task for jazzy spell 
> checker) I have prompts like this:
> 
> StringBuffer prompt = new StringBuffer(); prompt.append("Press C/c to 
> correct,\n\t"); prompt.append("C!/c! to correct and replace all 
> occurrences,\n\t"); prompt.append("I/i or Enter to ignore,\n\t"); 
> prompt.append("I!/i! or Enter to ignore all occurences,\n\t"); 
> prompt.append("or A/a to add to the dictionary:"); 
> input.setMessage(prompt.toString());
> String spellChoice =
> "spell.choice"+(spellChoiceId++);
> input.setAddproperty(spellChoice);
> 
> So the prompts contains lots of spaces and lots of new lines "\n" so 
> it is possible but very ugly to escape them in tje properties file.
> 
> Regards and thanks
> Ivan
> 
> > 
> > Cheers
> > 
> >         Stefan
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> > user-help@ant.apache.org
> > 
> > 
> 
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> http://promotions.yahoo.com/new_mail
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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




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


Mime
View raw message