1. ListView crashes program why?

------=_NextPart_000_0095_01C080AE.7B611A40
        charset="iso-8859-1"

Hi all,
It seems that if I use the line
=20
if deleteItem( LV, -1) then end if

On any LV and then switch to another tab control or window containing =
another LV  that it causes a crash.=20

Has anyone experienced / solved this problem.

Thanks Tony
Come Visit Me At www.locksdownunder.com


------=_NextPart_000_0095_01C080AE.7B611A40
        charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi all,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>It seems that if I use the =
line</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>if deleteItem( LV, -1) then end =
if</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>On any LV and then switch to another =
tab control or=20
window containing another LV&nbsp; that it causes a crash. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Has anyone experienced / solved this=20
problem.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks Tony</DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Come Visit Me At <A=20

------=_NextPart_000_0095_01C080AE.7B611A40--

new topic     » topic index » view message » categorize

2. Re: ListView crashes program why?

-----Original Message-----
From: Tony Steward

>Hi all,
>It seems that if I use the line

>if deleteItem( LV, -1) then end if

> On any LV and then switch to another tab control or
> window containing another LV  that it causes a crash.

> Has anyone experienced / solved this problem.

This is a bug in deleteItem().  Basically, it was deleting ALL listview
items, not just those belonging to the listview in question.  You can change
the elsif clause in deleteItem() to what I have below here, and it will work
like it should:

elsif window_type[ id ] = ListView then
    if pos = -1 then
        msg = LVM_DELETEALLITEMS

        iItem = 1

        while iItem <= length( lvitem_owner ) do
            if lvitem_owner[iItem] = id then
                removeLVItem( iItem )
                if iItem < length(lvitem_owner) then
                    iItem += 1
                end if
            else
                iItem += 1
            end if

        end while

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu