Thanks again for your detailed reply and for spending so much time on my query.
Firstly though, I have read the manual, but like most software manuals this is written for users who understand the language.
I have not used a "Windows" language before and so found it very difficault to understand the concepts.
Luckilly I discovered the Pure Basic book by Gary Willoughby.
So I am now at the experimenting stage.
That said, I still don't have a good "feel" for the language and so I can't spot errors that would be simple for experienced users.
The problem with the *ptr/s mentioned in my earlier post is a good example.
I had copied your code example, but in my code I had defined the *ptr.string in the code for adding values to the list, whereas it appears that it has to be in the code to return the values from the list.
When I don't define it in the code to return the values, I get the error mentioned in my post about the variable *ptr not having a structure. Note that the error message doesn't say how to correct this.
I read about pointers in the manual and I didn't seem to find anywhere the reasons as to why you might use them!!
Anyway, once I had the define statement in the correct location my application worked except for one last issue.
I cannot get the correct return value !!
Here is code to populate the list:
; Add values displayed in list
If FindMapElement(lAvevaLauncherServers()\Data(), "displayname")
If lAvevaLauncherServers()\Data("status") = "Y" Or (lAvevaLauncherServers()\Data("status") = "A" And bAdminUser = "1")
*ptr = FindMapElement(lAvevaLauncherServers()\Data(), "shortname") ; address of the data
SetGadgetItemData(Gadget_Form1_ListView8,-1, *ptr) ; store it
Here is the code to return the list value:
Item = GetGadgetState(Gadget_Form1_ListView8)
*ptr = GetGadgetItemData(Gadget_Form1_ListView8,Item) ; get it
Here is the debug output:
; Populate the List
: all seems ok - new *ptr values for each item
Melbourne Aveva Licence Server
Dortmund Aveva Licence Server
Dortmund Review Machine
Bad Soden Aveva Licence Server
; Try and get list value
; Select each item in the list
Note that even though the item returned is corrrect, GetGadgetItemData() always returns the same *ptr number !!
It looks as though the values stored in the code to populate the list are incorrect.
I'm sure that it is something simple as usual, but I'm afraid that I can't see it.