ListView Library Bug?

Tex8503

Active Member
Licensed User
Longtime User
Hey guys,
I think I've found a bug in the ListView library... It seems whenever I create a listview and load it on a secondary form, then call the form and load sql data into it - it dies.

I get an error "Error loading Program. Value does not fall within the expected range".

The funny part is that it works FINE on the PC, but dies on my Windows CE and Mobile devices. Also, If I disable the "FlushRTtable" function that occurs on load of the form and then click the button (It's called delete but its mapped to "FlushRTtable") - then it loads the data without error.

The goal is to load the list view in this secondary form and then have the data automatically populate. I'm open to suggestions.

I've crafted a subset of my main app below that causes the error to occur - I tried to strip everything out as much as possible to see if I could find the error. The application still uses the SQL library, the fggradientbutton library, and (obviously) the listview library.

Any help would be welcome!
 

Attachments

  • listviewbug.zip
    2 KB · Views: 260
D

Deleted member 103

Guest
So I tried it with me on my device (MDA Pro) and it works without problems.
 

Tex8503

Active Member
Licensed User
Longtime User
Weird. What version of windows mobile is your MDA Pro?

I've had this happen on both a Win CE 5.0 Dolphin 6500 and a WinMo 6.5 Motorola MC75...

Its annoying because for just about everything else - I can prep the screen in the background before displaying it to the user - except for the listview. If I do it before hand, when I show the form or panel - the app just up and dies. If I have the listview appear after the panel or form is visible - then it works fine...
 
D

Deleted member 103

Guest
Weird. What version of windows mobile is your MDA Pro?
Version 6.1

I think I've found a bug in the ListView library... It seems whenever I create a listview and load it on a secondary form, then call the form and load sql data into it - it dies.

I get an error "Error loading Program. Value does not fall within the expected range".
I'm sorry but I do not understand where the error is.
Your program, like now, has worked without error.

It may also be that I do not understand English, I understand the only thing I Google translated.:eek:

I modified your code a bit, I think it should work better.
 

Attachments

  • listviewbug.sbp
    4.1 KB · Views: 263
Last edited by a moderator:

rosippc64a

Active Member
Licensed User
Longtime User
In my program there was the same bug, and my solution was:
always add column definition before listview.loadsql()!
----------
So first add all needed column: listview.addcolumn() [,listview.addcolumn()]
and after it: listview.loadsql() (last parameter false, not to clear columns added before !!!!)
-----------
 
Top