Modeless form works, modal does not (?)

Started by hermanm · 2007-07-23 05:00 UTC · 2 replies · SMF topic #23

form shows, but unable to access controls, in modal version

Get error msg:

The control  variable argument passed to dcl_Control_SetText was NIL

same result in a2k6,a2k8
latest ODCL , WinXp

(?)

[attachment deleted by admin]
I think I get it - LISP gets suspended when the form is active, variables go out of scope when form is dismissed.

IOW, similar to native dcl
yes ...
To do what you want, use the Initialize event ..



;;Test3 - MODAL .. revised kwb

(DEFUN test3 (/ c:Test3_Form1_OnInitializ)
    (VL-LOAD-COM)
    ;;------------------------------------------------------
    (DEFUN c:Test3_Form1_OnInitialize (/)
        (DCL_CONTROL_SETTEXT Test3_Form1_Textbox1 "FooBar")
    )
    ;;------------------------------------------------------   
    (DCL_PROJECT_LOAD "Test3.odcl" T)
    (DCL_FORM_SHOW Test3_Form1)
    (PRINC)
)



(PRINC "\nTest3 loaded")
(PRINC)


[attachment deleted by admin]