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

Doriano Blengino doriano.blengino at ...1909...
Sat Nov 15 22:42:48 CET 2008


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."





More information about the User mailing list