Executed program or procedure raises exception for display operators like set_tposition when not using implementation of display operators
If you are not using an implementation of HDevelop's internal display operators (dev_*), calls to these operators in the executed HDevelop program or procedure are simply ignored. However, if the program or procedure contains other, “external” display operators like set_tposition or write_string, which need a window handle as input parameter, the program / procedure will raise an exception at this operator if the window handle has not been instantiated.Typically, this problem will not arise when executing programs, because you will in most cases use an implementation of the display operators. When executing procedures, we recommend that you leave out the external display operators that use window handles. If this is not possible, you could place them in a separate procedure and use the implementation of display operators for just this procedure. Alternatively, initialize the window handle with a value like -1 and test it before executing the external display operators.
External procedures cannot call local procedures
Note that local procedures can call external procedures but not the other way round.
To ensure that programs developed with HDevelop can be executed with HDevEngine without any further action, all standard procedures (see the HDevelop User's Guide) are automatically loaded when HDevEngine is started.
In most applications there is no need to delete loaded HDevelop procedures explicitly using UnloadProcedure. A reason might be to free memory.
Please note that when creating a procedure with the class HDevProcedure, the procedure is loaded together with all the procedures it uses. In contrast, UnloadProcedure deletes only the specified procedure. To delete the automatically loaded procedures, you can query their names using GetLoadedProcedureNames and then delete them (if you are sure that they are not used by another loaded procedure!), or you can use UnloadAllProcedures to unload all external procedures. Note that after calling UnloadProcedure or UnloadAllProcedures, GetProcedureNames still returns the names of the unloaded procedures.