On Saturday, August 11, 2007 9:02 AM> Behalf Of Ross Levis wrote: Subject: Rare access violations reading listitem.subitems
> The items were loaded at least 20 minutes prior to this function being > called, so it's not a matter of the ListItem being deleted or created > at the > same time. > > It's completely beyond me. Are there any known issues with ListViews > in > Delphi 7, or any other ideas? > > Thanks, > Ross. The TListView may be created 20 minutes prior to your code running, but none the less it might be in the process of being re-created. As I'm sure you know there's a distinction between the Delphi object and the underlying Windows object (Handle) and the two aren't always in sync. You can force an TWinControl to "free" it's associated Window object (Handle) at any time and it will re-create it when it needs it. Is it possible that the TListView got it's window handle recreated at some point? There are 3rd party Page controls that make an invisible page free it's Handle in an attempt to free System resources. Anyway, I think this is something wroth investigating (ie: if the TListView has an allocated Handle or not). Just don't check using the "Handle" property directly because the Window handle will get re-created as a side effect. Also - if this is just one client, ask if the client has any 3rd party windows skinning applications installed. That might get in the way of TListView as well. As a side note - I've seen this kind of behavior too, especially related to TComboBox's TStrings.Object[] thing. Whenever I trace a problem to something like this I always change my program not to depend on anything GUI for its data. Ex: I use a basic TStringList to hold data related to an TComboBox item. As for TListView, I prefer TVirtualTreeView! -- Cosmin Prund _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

