[Gambas-user] Difficulty interpreting listview documentation

Benoit Minisini gambas at ...1...
Fri Jun 20 12:06:06 CEST 2008


On jeudi 19 juin 2008, richard terry wrote:
> I'm pretty cretinous at interpreting docs.
>
> e.g:
>
> DIM hListView AS ListView
> DIM hListViewItem AS .ListViewItem
>
> hListViewItem = hListView [ Key AS String ]
>
> Just how does one  use .ListViewItem, because if you copy and past the
> above example into code, the interpretor bauks at the .ListViewItem.
>
> Any help appreciated.
>
> Richard
>

The documentation structure is automatically generated. But it is not clever 
enough to understand that an intermediate virtual class like ".ListViewItem" 
is not visible in code.

So when you see something like that, it means that you must write the code 
this way:

hListView[Key].Property
hListView[Key].Method()

You cannot just put hListView[Key] into a variable. You must use it 
immediately with a property or a method.

The only exception is the WITH instruction. You can do:

WITH hListView[Key]
  ...
END WITH

Because WITH is sort of syntactic sugar.

Regards,

-- 
Benoit Minisini




More information about the User mailing list