[Gambas-user] ColumnView and exec or shell to button

Nicolas Koch nkoch22 at ...626...
Sun Nov 16 04:29:13 CET 2008


Doriano,

Thanks for the help I actually came up with something similar before I
got your email.

This is what I used.  Thanks again for the help.

PUBLIC SUB Install_Click()

  DIM thisKey AS String
  DIM data AS String
  IF Software.Current = NULL THEN RETURN
  data = Software.Current.Text
  SHELL "~/.wrtest" &/ data

END


Regards,
Nick

On Sun, Nov 16, 2008 at 12:42 AM, Doriano Blengino
<doriano.blengino at ...1909...> wrote:
> Nicolas Koch ha scritto:
>> well this is what I got so far
>>
>> Just to clarify Software = CloumnView1
>>
>> ' Gambas class file
>>
>>
>>   ' Software List
>>   Software.Clear()
>>   Software.Add("key1", "wrtest")
>>   Software.Add("key1-1", "test1", NULL, "key1")
>>   Software.Add("key1-2", "test2", NULL, "key1")
>>
>> END
>>
>> 'Install Software
>>
>> PUBLIC SUB Install_Click()
>>
>>   IF Software.Current = NULL THEN RETURN
>>
>> END
>>
>>
>> Where would I add the command for each row in the column?  Is this
>> correct so far?
>>
> As far I can see, there is nothing wrong. But: what are "wrtest",
> "test1" and so on? If they are command names, ie executables, then you
> are showing them through the Software Columnview. Install_Click() could do:
>
>  IF Software.Current = NULL THEN RETURN
>  SHELL Software.Current.text
>
> this would execute "wrtest", "test1", "test2", depending on what is the current item of Software.
>
> Regards,
>
> --
> Doriano Blengino
>
> "Listen twice before you speak.
> This is why we have two ears, but only one mouth."
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list