1. Error in Win32Lib - prob bad code

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

new topic     » topic index » view message » categorize

2. Re: Error in Win32Lib - prob bad code

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: Error in Win32Lib - prob bad code

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu