2009-04-17 06:22 UTC
Greetings to all.
I am new to this forum and also trying to learn openDCL.
My first attempt really puzzles me and hope to get some help.
I am using acad map 2004 and ver 5.0.0.25 opendcl.
In my odcl file, the name of my modal form is TESTING and correspondingly in the lsp file also TESTING.
This works out as expected. see p1.jpg
(defun c:TET (/
c:W3_TESTING_Cancel_OnClicked
c:W3_TESTING_OnInitialize
c:W3_TESTING_OK_OnClicked
c:W3_TESTING_SKALA_OnEditChanged
)
(defun c:W3_TESTING_OnInitialize ()
(dcl_Control_SetText W3_TESTING_SKALA
(cdr (assoc "SKALA" wg:constant-list)) )
)
(defun c:W3_TESTING_Cancel_OnClicked ()
(dcl_Form_Close W3_TESTING)
)
(defun c:W3_TESTING_OK_OnClicked ()
;; update wg:constant-list
(if (<= (atoi (dcl_control_gettext W3_TESTING_skala)) 0)
(progn
(dcl_MessageBox "SCALE > 0")
)
(progn
(setq wg:constant-list
(subst (cons "SKALA" (ATOI (dcl_control_gettext W3_TESTING_skala)))
(assoc "SKALA" wg:constant-list)
wg:constant-list
)
)
(dcl_Form_Close W3_TESTING)
)
);if
)
(defun c:W3_TESTING_SKALA_OnEditChanged (sText /)
(print "stext ")(print stext)
(setq svariable sText)
(print "svariable ")(print svariable)
)
(or LoadRunTime (load "_OpenDclUtils.lsp") (exit))
(LoadRunTime)
(LoadODCLProj "W3.odcl")
(dcl_FORM_SHOW W3_TESTING)
;; The Event handlers manage the form here.
(PRINC)
(print "wg:constant-list ")
(print wg:constant-list)
)
Then I change the name of the modal form to TESTING1 or some other name and also change it in the lsp file. However this does not work out. see p2.jpg
Where have I gone wrong??
(defun c:TET (/
c:W3_TESTING1_Cancel_OnClicked
c:W3_TESTING1_OnInitialize
c:W3_TESTING1_OK_OnClicked
c:W3_TESTING1_SKALA_OnEditChanged
)
(defun c:W3_TESTING1_OnInitialize ()
(dcl_Control_SetText W3_TESTING1_SKALA
(cdr (assoc "SKALA" wg:constant-list)) )
)
(defun c:W3_TESTING1_Cancel_OnClicked ()
(dcl_Form_Close W3_TESTING1)
)
(defun c:W3_TESTING1_OK_OnClicked ()
;; update wg:constant-list
(if (<= (atoi (dcl_control_gettext W3_TESTING1_skala)) 0)
(progn
(dcl_MessageBox "SCALE > 0")
)
(progn
(setq wg:constant-list
(subst (cons "SKALA" (ATOI (dcl_control_gettext W3_TESTING1_skala)))
(assoc "SKALA" wg:constant-list)
wg:constant-list
)
)
(dcl_Form_Close W3_TESTING1)
)
);if
)
(defun c:W3_TESTING1_SKALA_OnEditChanged (sText /)
(print "stext ")(print stext)
(setq svariable sText)
(print "svariable ")(print svariable)
)
(or LoadRunTime (load "_OpenDclUtils.lsp") (exit))
(LoadRunTime)
(LoadODCLProj "W3.odcl")
(dcl_FORM_SHOW W3_TESTING1)
;; The Event handlers manage the form here.
(PRINC)
(print "wg:constant-list ")
(print wg:constant-list)
)
I am new to this forum and also trying to learn openDCL.
My first attempt really puzzles me and hope to get some help.
I am using acad map 2004 and ver 5.0.0.25 opendcl.
In my odcl file, the name of my modal form is TESTING and correspondingly in the lsp file also TESTING.
This works out as expected. see p1.jpg
(defun c:TET (/
c:W3_TESTING_Cancel_OnClicked
c:W3_TESTING_OnInitialize
c:W3_TESTING_OK_OnClicked
c:W3_TESTING_SKALA_OnEditChanged
)
(defun c:W3_TESTING_OnInitialize ()
(dcl_Control_SetText W3_TESTING_SKALA
(cdr (assoc "SKALA" wg:constant-list)) )
)
(defun c:W3_TESTING_Cancel_OnClicked ()
(dcl_Form_Close W3_TESTING)
)
(defun c:W3_TESTING_OK_OnClicked ()
;; update wg:constant-list
(if (<= (atoi (dcl_control_gettext W3_TESTING_skala)) 0)
(progn
(dcl_MessageBox "SCALE > 0")
)
(progn
(setq wg:constant-list
(subst (cons "SKALA" (ATOI (dcl_control_gettext W3_TESTING_skala)))
(assoc "SKALA" wg:constant-list)
wg:constant-list
)
)
(dcl_Form_Close W3_TESTING)
)
);if
)
(defun c:W3_TESTING_SKALA_OnEditChanged (sText /)
(print "stext ")(print stext)
(setq svariable sText)
(print "svariable ")(print svariable)
)
(or LoadRunTime (load "_OpenDclUtils.lsp") (exit))
(LoadRunTime)
(LoadODCLProj "W3.odcl")
(dcl_FORM_SHOW W3_TESTING)
;; The Event handlers manage the form here.
(PRINC)
(print "wg:constant-list ")
(print wg:constant-list)
)
Then I change the name of the modal form to TESTING1 or some other name and also change it in the lsp file. However this does not work out. see p2.jpg
Where have I gone wrong??
(defun c:TET (/
c:W3_TESTING1_Cancel_OnClicked
c:W3_TESTING1_OnInitialize
c:W3_TESTING1_OK_OnClicked
c:W3_TESTING1_SKALA_OnEditChanged
)
(defun c:W3_TESTING1_OnInitialize ()
(dcl_Control_SetText W3_TESTING1_SKALA
(cdr (assoc "SKALA" wg:constant-list)) )
)
(defun c:W3_TESTING1_Cancel_OnClicked ()
(dcl_Form_Close W3_TESTING1)
)
(defun c:W3_TESTING1_OK_OnClicked ()
;; update wg:constant-list
(if (<= (atoi (dcl_control_gettext W3_TESTING1_skala)) 0)
(progn
(dcl_MessageBox "SCALE > 0")
)
(progn
(setq wg:constant-list
(subst (cons "SKALA" (ATOI (dcl_control_gettext W3_TESTING1_skala)))
(assoc "SKALA" wg:constant-list)
wg:constant-list
)
)
(dcl_Form_Close W3_TESTING1)
)
);if
)
(defun c:W3_TESTING1_SKALA_OnEditChanged (sText /)
(print "stext ")(print stext)
(setq svariable sText)
(print "svariable ")(print svariable)
)
(or LoadRunTime (load "_OpenDclUtils.lsp") (exit))
(LoadRunTime)
(LoadODCLProj "W3.odcl")
(dcl_FORM_SHOW W3_TESTING1)
;; The Event handlers manage the form here.
(PRINC)
(print "wg:constant-list ")
(print wg:constant-list)
)