Next: , Previous: %CADView, Up: CAD areas and methods


6.5 CADOnError

CADOnError is not a callable method, but a prototype of a 4D method that you install as an error callback method. 4D CAD will call the method when an error occurs as a result of user operations in the 4D CAD area.

IO Parameter Type Description
in theCADArea longint Area ID
in theError OSErr The Error result code found. Note that CADOnError is not called for kCADUserCanceledOperation or kCADNoError
in theAlertFlag integer kCADFalse if the error occurred during a screen update, so that an alert dialog could possibly cause an endless loop, kCADTrue otherwise
out theErrorResult longint Set to kCADErrorResultDoFilter to handle the error yourself, set to kCADErrorResultDontFilter to let 4D CAD handle the error.

The method is not called when a 4D CAD method finds an error. Methods return an Error result code, see Error handling.

Important
You must type the parameters of callback methods, otherwise 4D will crash in a compiled application.

Related methods
CADGetOnError, CADSetOnError, CADGetOnEvent, CADSetOnEvent, CADOnEvent.