2009-12-02 17:45 UTC
i get the error message
Error: NIL value not allowed
Function: dcl_control_setlist
Argument: 0
here is my code
the file test.txt does exist in the local C
what am i doing wrong?
Error: NIL value not allowed
Function: dcl_control_setlist
Argument: 0
here is my code
(command "OPENDCL")
(defun c:Hello ()
; call the method to load the HelloWorld.odcl file.
(dcl_Project_Load "od-test1" T)
; call the method to show the Hello World dialog box example
(dcl_Form_Show od-test1_Form1)
(princ)
)
(defun c:od-test1_Form1_TextButton1_OnClicked (/)
(dcl_Form_Close od-test1_Form1)
)
(defun c:od-test1_Form1_OnInitialize (/)
(setq datafile "c:\test.txt")
(setq ofile (open datafile "r"))
(while (setq curline (read-line ofile))
(setq file_content_list (cons curline file_content_list))
)
(close ofile)
(setq file_content_list (reverse file_content_list))
(dcl_Control_SetList od-test1_Form1_ListBox1 file_content_list)
)
(defun c:od-test1_Form1_TextButton2_OnClicked (/)
(dcl_Control_GetCaption od-test1_Form1_TextButton2)
)
the file test.txt does exist in the local C
what am i doing wrong?


