how to free or destroy a component on a form before it has been created in delphi
I have 2 applications, Error Processing and Work Order. Both individual applications have dxSpellChecker component in them. The Work Order application calls one of the forms in the Error Processing application and on formCreate I get an exception saying an application can only have 1 instance of dxSpellChecker. So I was going to try to free or destroy the component on create but I can't do it before the create (since it doesnt know it exists yet) and I couldnt do it after create because the exception occurs on the Create line.
Any ideas? Attached code... I get the exception right on the Create(Self)
frmErrorDataEntry1 := TfrmErrorDataEntry1.Create(Self); with frmErrorDataEntry1 do begin sJobnum := frmJobErrorsList.sJobnum; sPart := frmJobErrorsList.sPart; sContractor := frmJobErrorsList.sContractor; sSalesRep := frmJobErrorsList.sSalesRep; sJobName := frmJobErrorsList.sJobName; sJobLocation := VarNullToString(frmJobErrorsList.sJobLocation); sErrorID := '0';
You can not destroy a component before its created or loaded