Jeremy,

>My app sometimes tries to show a hidden form that is no longer in 
existence, but I can't think of a reason for it to no longer exist.  Here's 
the scenario:
>
>There is a search form, and a detail form, both Created and in existence 
always, but only one is visible at a given moment.  In the search screen a 
click handler does this:
>
>  myobj.loaddata;
>  self.hide;
>  viewDetail(myobj); // does a ShowModal on the detail form.  Detail form 
closes itself, but does not free.
>  self.show; //access violation here --sometimes, not always--.
>
>This works fine almost all the time.  Obviously, some users (or the OS) 
are doing something I'm not expecting, but what?  The detail form is modal, 
and the search form is not visible, so how can it be freed? Or maybe more 
precisely, how can Self not point to something Show-able?
>
>I must have a blind spot here.  Any suggestions?

Debugging a sporatic problem like this can be difficult.
What I would try to start is change the self references
to the use the TForm.Name.

Glenn Lawler
www.incodesystems.com

Reply via email to