[Gambas-user] ListView with spaces help

Michael mdavies5 at ...169...
Sun Jan 30 02:19:32 CET 2011


SInce a SHELL command must exclude spaces then put it into your listview 
without spaces. If you want to include spaces for readability then 
remove them when you pass to SHELL:
ListView.Current.text.Replace(" ", "")

Regards
Michael


On 30/01/11 06:17, Nicolas Koch wrote:
> I have a populated ListView and I want to run commands from the list, but
> the list items with spaces won't work in SHELL or EXEC.
>
> Message.Info(ListView.Current.Text) will return the list item with spaces as
> it should ie. "this is test"
>
> however when I go to
>
> EXEC [ListView.Current.Text]
> or
> SHELL ListView.Current.Text
>
> only "this" will show up in SHELL or EXEC and not "this is test"
>
>
> How do I get ListView.Current.Text to keep the spaces when I EXEC or SHELL?
>
>
>
> code:
>
> PUBLIC SUB Run_Click()
>
>    Message.Info(ListView.Current.Text)
>
>    *' EXEC [ListView.Current.Text]*
>
>    SHELL (ListView.Current.Text)
>
> END
>




More information about the User mailing list