PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Error 41 with list_box find due to negative index ...  (Read 1391 times)

Ken Sproul

  • Gold Member
  • ****
  • Posts: 60
    • View Profile
Error 41 with list_box find due to negative index ...
« 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?
Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC

Ken Sproul

  • Gold Member
  • ****
  • Posts: 60
    • View Profile
Re: Error 41 with list_box find due to negative index ...
« Reply #1 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.
Ken Sproul
DPI Information Service, Inc.
Pivotal Systems LLC