• Welcome to Valhalla Legends Archive.
 

ListView Skip

Started by CrAz3D, March 01, 2004, 09:51 PM

Previous topic - Next topic

CrAz3D

I am trying to find a user, by an index, remove the user, & the re-add the user w/new updated flags.

The code makes it skip everyother user (ie Userlist = Telos, Pyhric, Ban... it will only modify Telos & Ban while totally leaving Pyhric's flags blank)

I think the problem may lie within my loopsing & removing code


for i =1 to FrmDb.DB.ListItems.Count
    'replace flag junk
frmdb.db.listitems(i).remove
frmdb.db.listitems.add,,username
    frmdb.db.listitems(i).add,,flags

next i


EDIT:
Using

frmdb.db.listitems(frmdb.db.listitems.count)
or
frmdb.db.listitems(frmdb.db.finditem(origuser).index)


Makes the entire thing loop through twice skipping people & adding flags twice that users already have.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

CrAz3D

It seems as though that I am true to my signature.  I just had to use the same index# when re-adding the username & flags.

i3 = frmDB.DB.FindItem(OrigUser).Index
           frmDB.DB.ListItems.Remove (i3)
           frmDB.DB.ListItems.Add i3, , OrigUser
               frmDB.DB.ListItems(i3).ListSubItems.Add , , DoneFlags
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...