G
Guest
I am getting an ObjectDisposedException on closing a form and am at a loss as
to why it is happening. My understanding is that such an exception occurs
when an disposed object is referenced. However, I cannot identify where this
is happening. Below is the code:
private void lstPracs_SelectedIndexChanged(object sender, System.EventArgs e)
{
if (this.lstPracs.SelectedValue.GetType() == typeof (Int16))
{
AttDetailsFrm frmAttDetails = (AttDetailsFrm)
FormMgr.Instance.OpenForm (Type.GetType
"CompTrackerPPC.AttDetailsFrm"));
frmAttDetails.PracId = (Int16)this.lstPracs.SelectedValue;
frmAttDetails.Show();
this.Close();
}
}
It seems the exception is raised after the above method exits.
Any suggestions would be greatly appreciated.
Ollie
to why it is happening. My understanding is that such an exception occurs
when an disposed object is referenced. However, I cannot identify where this
is happening. Below is the code:
private void lstPracs_SelectedIndexChanged(object sender, System.EventArgs e)
{
if (this.lstPracs.SelectedValue.GetType() == typeof (Int16))
{
AttDetailsFrm frmAttDetails = (AttDetailsFrm)
FormMgr.Instance.OpenForm (Type.GetType
"CompTrackerPPC.AttDetailsFrm"));
frmAttDetails.PracId = (Int16)this.lstPracs.SelectedValue;
frmAttDetails.Show();
this.Close();
}
}
It seems the exception is raised after the above method exits.
Any suggestions would be greatly appreciated.
Ollie