Extract parameters

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Extract parameters

Adrien BARREAU
Hello all,

When I worked on a command-line tool, I discovered SmalltalkImage>>extractParameters.

I didn't find it very good, so I wrote the little method attached to this mail.

I think it could be useful. What do you think about that?

Here is an example:
        I suppose I run pharo with: `pharo myImage.image -minus1 'Hello' -minus2 -minus3 'Hello' 'World'`.
        This message will return a dictionary with:
            minus1 --> #(Hello)
            minus2 --> #()
            minus3 --> #('Hello' 'World').

The first extractParameters was quite strange, since it starts to look at the third parameter (or, the second can be used!), and can not return a list.

Adrien.


Vous voulez protéger votre vie privée ? La solution avec Internet Explorer 8
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

SmalltalkImage-extractMinusParameters.st (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Extract parameters

Stéphane Ducasse
Hello all,
>
> When I worked on a command-line tool, I discovered SmalltalkImage>>extractParameters.
>
> I didn't find it very good, so I wrote the little method attached to this mail.
>
> I think it could be useful. What do you think about that?

Thanks
>
> Here is an example:
>         I suppose I run pharo with: `pharo myImage.image -minus1 'Hello' -minus2 -minus3 'Hello' 'World'`.
>         This message will return a dictionary with:
>             minus1 --> #(Hello)
>             minus2 --> #()
>             minus3 --> #('Hello' 'World').
>
> The first extractParameters was quite strange, since it starts to look at the third parameter (or, the second can be used!), and can not return a list.

And also when you type

        vm image bib test.bib

you do not get
        bib -> test.bib
        but simply
                'TEST.BIB'
which can be a problem
Tell me I remember correctly

>
> Adrien.
>
> Vous voulez protéger votre vie privée ? La solution avec Internet Explorer 8 <SmalltalkImage-extractMinusParameters.st>_______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Extract parameters

Stéphane Ducasse
In reply to this post by Adrien BARREAU
http://code.google.com/p/pharo/issues/detail?id=2599


On Jun 29, 2010, at 4:30 PM, Adrien BARREAU wrote:

> Hello all,
>
> When I worked on a command-line tool, I discovered SmalltalkImage>>extractParameters.
>
> I didn't find it very good, so I wrote the little method attached to this mail.
>
> I think it could be useful. What do you think about that?
>
> Here is an example:
>         I suppose I run pharo with: `pharo myImage.image -minus1 'Hello' -minus2 -minus3 'Hello' 'World'`.
>         This message will return a dictionary with:
>             minus1 --> #(Hello)
>             minus2 --> #()
>             minus3 --> #('Hello' 'World').
>
> The first extractParameters was quite strange, since it starts to look at the third parameter (or, the second can be used!), and can not return a list.
>
> Adrien.
>
> Vous voulez protéger votre vie privée ? La solution avec Internet Explorer 8 <SmalltalkImage-extractMinusParameters.st>_______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project