Why does this error occur using 'OnInitialize'

Started by JustCurious · 2023-05-08 07:35 UTC · 0 replies · SMF topic #2858


Hello everyone,

I wonder what this message means when loading an ODCL project into BricsCAD V.23:

; ----- Error around expression -----
; (AL_EXECUTEADSDEFUN "DCL-FORM-SHOW" REST)
; in file :
; C:\Program Files (x86)\Common Files\OpenDCL\OpenDCL.x64.23.brx
;
; error : bad argument type <#< #x40 @1000c71e36>> ; expected at
;
; error : during LISP function [c:myProject/myDialog#OnInitialize] invoke from BRX/SDS interface,
          please check Lisp function definition and call arguments.
: VLIDE


It is obiously invoked by this piece of code:

(defun c:myProject/myDialog#OnInitialize (/)
  (dcl-MessageBox "To Do: code must be added to event handler\r\nc:myProject/myDialog#OnInitialize" "To do")
)


But since this code does not do anything as it comes out of the box, I feel there may be wrong something else...

The onInitialize function itself, in my "program" it does not seem to be necessary but I believe it is somehow mandatory, the help file does not provide the