Has a parent form been closed?
Posted: Sat Jun 25, 2011 7:08 pm
How do I tell if a calling / parent form has been terminated?
The situation I have right now is a "Manage objects" form which creates an instance of the Edit form, running a "setCallingForm" method which sets a reference back to the calling form, when the edit form closes it tells the Manage Objects form that it has closed by running a form. This works but if a user closes the Manage objects form before the Edit Objects form, it gives the error "Object not found" because the calling form has been unloaded.
Is there a boolean test that can tell me if the calling form is still loaded? "if getCallingForm() <> null then..." also produces the above error.
The situation I have right now is a "Manage objects" form which creates an instance of the Edit form, running a "setCallingForm" method which sets a reference back to the calling form, when the edit form closes it tells the Manage Objects form that it has closed by running a form. This works but if a user closes the Manage objects form before the Edit Objects form, it gives the error "Object not found" because the calling form has been unloaded.
Is there a boolean test that can tell me if the calling form is still loaded? "if getCallingForm() <> null then..." also produces the above error.