<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Ross<br>
<br>
What a vague description of the problem.<br>
<br>
It sounds like you program by mysticism more than logic. Despite
what you might believe, some or all of the objects in your listview
have most likely been destroyed and you're looking at random memory,
where the objects used to be.<br>
<br>
In order to solve this problem, you need to isolate "where" every
object in your list is created and destroyed. Then use the debugger
to find out "when" those events occur. If the window is being
destroyed and re-created, where and when are those objects
re-instantiated? Is this a multi-threaded application?<br>
<br>
Todd. <br>
<br>
<blockquote cite="mid:003f01ce350b$fddc51f0$f994f5d0$@com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 3 0 0 0 0 0 0 0;}
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 3 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:2 2 3 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size: 12pt; color:
rgb(31, 73, 125);">Wondering if anyone has any ideas.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 12pt; color:
rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 12pt; color:
rgb(31, 73, 125);">I've had this problem a long time from
when I started writing an app about 7 or 8 years ago, but it
happens so rarely it's not usually an issue. But one user in
particularly is regularly sending me MadExcept reports which
either have access violation errors or "the application
appears to be frozen". In all cases it's during an access of
a TListItem which was perfectly valid 10 lines of code up a
procedure but suddenly doesn't exist.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 12pt; color:
rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 12pt; color:
rgb(31, 73, 125);">The screenshot created at the same time
shows the ListView has no visible items, but I know for a
fact there are 30 or more items in the list. I believe
sometimes the items visually disappear and reappear shortly
afterwards, like a Desktop refresh.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 12pt; color:
rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 12pt; color:
rgb(31, 73, 125);">I think I've heard something about
Windows recreating the window handles or some such thing. I
don't understand why it would do so. There are no changes to
the listview that would require re-creating the window.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 12pt; color:
rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 12pt; color:
rgb(31, 73, 125);">Any ideas?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 12pt; color:
rgb(31, 73, 125);"><o:p> </o:p></span></p>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe</pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<i>Fortune</i> favours the <b>brave</b></div>
</body>
</html>