Page 1 of 1

EInvalidOperation exception in procedure TZAbstractDataset

Posted: 24.12.2006, 06:15
by doug4
Under certain conditions I am getting an EInvalidOperation exception “Cannot focus a disabled or invisible window.” in procedure “TZAbstractDataset.InternalPost”. The exception occurs when the “inherited;” statement is called. It only happens when inserting a record using the JEDI “TJvDBGrid” component. It may be related to the “EditControls” property of TJvDBGrid. I have not been able to cause the error when doing updates, but only when inserting a record when using the EditControls property of TJvDBGrid.

I am getting around this problem by wrapping the “inherited;” statement as follows, but there must be a better way to handle or fix this problem:

try
inherited;
except
end;

The insert is successful if I use "try" to wrap the "inherited" as above.

Is there a problem or bug in procedure “TZAbstractDataset.InternalPost”? What it is the proper way to handle it?

Thanks,
doug4