2016-08-09 15:51 UTC
EDIT: Solved - see below.
------------------
I have a modal dialogue to insert blocks, displayed in "images". There is a loop to
- open the dialogue initially
- close and open it when double-clicking the images
- close it when the button "close" (or Esc ..) are pressed.
As reported in the "Subject" of this posting. "dcl-Form-Show" returns "too many arguments" ...??
This is my structure:
; start of main-function
(defun c:MyApp (/ cmdecho form-type first-run value)
--> do some readings and preparartions and settings ...
;; Load the project
(dcl-Project-Load "MyApp.odcl")
;; Show the main form
(setq dialogstatus 20) ; the doubleclick on the images set this value on 20 to keep the loop alive until "Close"
(while (= dialogstatus 20)
(setq dialogstatus (dcl-Form-Show MyApp/MyApp)) ; here the modal dialogue will be shown. dialogstatus will be set via the close-commands
; a) here "oninitialize" will work
; b) then the doubleclick-events will work
(if (= dialogstatus 20) ; if I click an image, 20 will be used and the loop continues
(progn
--> do something
)
)
) ; ende while
(princ)
)
; end of main-function
; oninitialize
(defun c:MyApp/MyApp#OnInitialize (/)
--> do some communication between existing values and the display of controls, start the display of the images (load picture)
(princ "\nInitialize fertig.")
)
; one doubleclick-event on "image"
(defun c:MyApp/MyApp/SigTaf_WMF1#OnDblClicked ()
--> do something, then close the dialogue with the value 20 to keep the loop alive
(dcl-Form-Close MyApp/MyApp 20)
)
--> The CLOSE here returns 20 to the previous SHOW from above; then it does something and the loop keeps on.
; the standard close button
(defun c:MyApp/MyApp/Exit#OnClicked (/)
(dcl-Form-Close MyApp/MyApp 10)
)
--> this returns 10 to the SHOW from above, the loop will end.
The message "too many arguments" appears both when the dialogue starts the first time or when it is re-started from the loop.
What's wrong? The basic structure of the routine?
Thanks and regards
------------------
I have a modal dialogue to insert blocks, displayed in "images". There is a loop to
- open the dialogue initially
- close and open it when double-clicking the images
- close it when the button "close" (or Esc ..) are pressed.
As reported in the "Subject" of this posting. "dcl-Form-Show" returns "too many arguments" ...??
This is my structure:
; start of main-function
(defun c:MyApp (/ cmdecho form-type first-run value)
--> do some readings and preparartions and settings ...
;; Load the project
(dcl-Project-Load "MyApp.odcl")
;; Show the main form
(setq dialogstatus 20) ; the doubleclick on the images set this value on 20 to keep the loop alive until "Close"
(while (= dialogstatus 20)
(setq dialogstatus (dcl-Form-Show MyApp/MyApp)) ; here the modal dialogue will be shown. dialogstatus will be set via the close-commands
; a) here "oninitialize" will work
; b) then the doubleclick-events will work
(if (= dialogstatus 20) ; if I click an image, 20 will be used and the loop continues
(progn
--> do something
)
)
) ; ende while
(princ)
)
; end of main-function
; oninitialize
(defun c:MyApp/MyApp#OnInitialize (/)
--> do some communication between existing values and the display of controls, start the display of the images (load picture)
(princ "\nInitialize fertig.")
)
; one doubleclick-event on "image"
(defun c:MyApp/MyApp/SigTaf_WMF1#OnDblClicked ()
--> do something, then close the dialogue with the value 20 to keep the loop alive
(dcl-Form-Close MyApp/MyApp 20)
)
--> The CLOSE here returns 20 to the previous SHOW from above; then it does something and the loop keeps on.
; the standard close button
(defun c:MyApp/MyApp/Exit#OnClicked (/)
(dcl-Form-Close MyApp/MyApp 10)
)
--> this returns 10 to the SHOW from above, the loop will end.
The message "too many arguments" appears both when the dialogue starts the first time or when it is re-started from the loop.
What's wrong? The basic structure of the routine?
Thanks and regards