Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mixed behavior of Arrays and Listboxes
Message
De
29/04/2003 16:11:48
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Mixed behavior of Arrays and Listboxes
Divers
Thread ID:
00782900
Message ID:
00782900
Vues:
53
Hi,

I have a listbox (lstCadItens) in a form made of 3 columns (lstCadItens.ColumnCount=3), populated from a cursor that has 3 fields, created as a result of a SQL Select (lstCadItens.RowSourceType=2).

When the "Details" command button of that form is pressed I get the key to access a table to read the item's details by issuing:
wIT_CodItem = ThisForm.lstCadItens.List (ThisForm.lstCadItens.ListIndex, 2)

Select Table
Seek   wIT_CodItem
In my test lstCadItens.ListCount=71131, and the ListBox shows fine, scrolls fine etc. All works fine, with the exception of ThisForm.lstCadItens.ListIndex being greater than 65000 (that by coincidence is the maximum number of elements allowed for an array), when I get error number 31: invalid subscript reference.

If I think of my ListBox as being an array, it would be an array of 213,393 elements (71,131*3), and it would not fit in the limit of 65,000 elements for arrays, but it exists and displays its content. OTOH, the error occurs when the first index (that points to the rows) to the "ListBox array" is 65,001 or greater.

The question is: should a ListBox be thought as an array, or this is a bug, because I have no knowledge of the limit of rows for a ListBox being 65,000 or any other value.

I'm working with VFP 6.0 SP5.

Thanks,

Fernando

PS. I already made a workaround and am working ok with my 71,131 rows ListBox, but still want to know more about this behavior, that I found a bit strange.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform