1. Error in Win32Lib - prob bad code
- Posted by Ray Tomes <rtomes at ihug.co.nz> Jun 19, 2003
- 425 views
Hi Euphorians I am trying to do a table using a list window and have the following code: ---start code--- listwin = create(Window,"Quick Key Assign to Program", 0,Center,Center,400,400,0) alist = create(ListView,{"Key - Program to Launch - Parameters"}, listwin,5,5,350,340,0) for ib=1 to 36 do i = insertItem(alist,"something",ib) end for openWindow(listwin, Normal) ---end code--- When I run this code I get the following error from the insertItem line: C:\EUPHORIA\DL\Win32Lib\Include\Win32lib.ew:16901 in function insertItem() variable msg has not been assigned a value I guess that I have coded it wrong some way, possibly used a wrong combination of calls. Help! Ray Tomes
2. Re: Error in Win32Lib - prob bad code
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 20, 2003
- 418 views
On Fri, 20 Jun 2003 11:49:59 +1200 (06/20/03 09:49:59) , Ray Tomes <rtomes at ihug.co.nz> wrote: > > > Hi Euphorians > > I am trying to do a table using a list window and have the following > code: > ---start code--- > listwin = create(Window,"Quick Key Assign to Program", > 0,Center,Center,400,400,0) > alist = create(ListView,{"Key - Program to Launch - Parameters"}, > listwin,5,5,350,340,0) > for ib=1 to 36 do > i = insertItem(alist,"something",ib) > end for > openWindow(listwin, Normal) > ---end code--- > > When I run this code I get the following error from the insertItem line: > C:\EUPHORIA\DL\Win32Lib\Include\Win32lib.ew:16901 in function > insertItem() > variable msg has not been assigned a value > > I guess that I have coded it wrong some way, possibly used a wrong > combination of calls. Help! Ray, unfortunately, insertItem() only works for List and Combo type controls, and not ListView controls. I know I should make it work for them too, but that's not how it works today. Instead, use the addLVItem() like this... VOID = setLVInsert(True) -- Add to bottom of list. for ib=1 to 36 do i = addLVItem(alist,0, "something:" & sprintf("%d",ib)) end for -- cheers, Derek Parnell
3. Re: Error in Win32Lib - prob bad code
- Posted by Ray Tomes <rtomes at ihug.co.nz> Jun 20, 2003
- 395 views
Derek Parnell wrote: > unfortunately, insertItem() only works for List and Combo type controls, > and not ListView controls. I know I should make it work for them too, > but that's not how it works today. > > Instead, use the addLVItem() Thank you Derek