PxPlus User Forum

Main Board => Discussions => Language => Topic started by: Ken Sproul on September 14, 2018, 08:44:11 PM

Title: Error 41 with list_box find due to negative index ...
Post by: Ken Sproul on September 14, 2018, 08:44:11 PM
A tree view list box has a large number of elements.  The list_box read is returning a negative index that results in an error 41 when used with list_box find to look at elements above and below the current index.  The item property doesn't error with the negative value, but accessing the itemtext$ property afterwards reslults in an error 11.

I coudn't find any index limits in the language reference, but it seems to be limited to something in the 32k range.  Has anyone run into this and found a workaround?  Is it a PxPlus or windows limit?
Title: Re: Error 41 with list_box find due to negative index ...
Post by: Ken Sproul on September 14, 2018, 09:20:17 PM
I was able to work around the issue by adding 65536 to the negative index.  If this is a PxPlus limit, it may be time to increase it before we exceed 65536 elements in the tree view.