set caption retuning nil error?

Started by andrew, September 20, 2010, 09:06:12 AM

Previous topic - Next topic

andrew

im sure im just forgetting something simple but i can not set the caption
the dialog box pops up but the caption isnt being set
im using v6.0.0.27

here is my code snippet
check_file = a time string


;; Ensure OpenDCL Runtime is (quietly) loaded
(setq cmdecho (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(command "_OPENDCL")
(setvar "CMDECHO" cmdecho)


; call the method to load the odcl file.
(dcl_Project_Load "stkfilecheck" T)

(defun display_notice (/)
(dcl_Form_Show stkfilecheck_Form1 )
;(dcl_Control_SetCaption stkfilecheck_Form1_Label1 check_file)
)

(if (/= check_file_time "11:20 AM")
(display_notice)
(dcl_Control_SetCaption stkfilecheck_Form1_Label1 check_file)
)


owenwengerd

If your form is a modal dialog, then the (dcl_control_setcaption) call in your example would occur after the dialog is closed. Try putting that code in the form's OnInitialize event handler instead.
Owen Wengerd (Outside The Box) / ManuSoft

andrew