ListView problem - Bug or Me?
Hi all,
I am reading a db where all records go into LV "KeysList" and only
Unique or 1st found records go into LV "ListOfKeys". Now this code
worked when it was a normal list but when I decided a LV would be
better. No way can I make it work. It seems that when I add a LV item
and then check the LV as follows that it doesn't see the last item added
- I think!
Heres the code:
for i = db_table_size() to 1 by -1 do -- Read backwards to put LV
in Alpha Order
data = db_record_data(i)
lvItemNo = addLVItem( KeysList, myicon, data[1..4]) -- Add
record to KeysList Regardless of data[1]
oktoadd = 0
for z = 1 to getLVCount(ListOfKeys) do -- Check from top
to bottom of LV
temp = getLVItemText(ListOfKeys, z, 1) -- temp = row z
column 1
if equal(data[1], temp[1]) then -- if data[1] and temp
are the same changing oktoadd to 1 prevents the current record from
--being added
oktoadd = 1
end if
end for
if oktoadd = 0 then -- Not found in LV so add to LV
lvItemNo = addLVItem( ListOfKeys, myicon, data[1..2])
end if
end for
Come visit me at www.locksdownunder.com
|
Not Categorized, Please Help
|
|