I have a modal form where I have this basic structure:
(defun c: main ()
.. prepare something ..
(setq result 10)
(while (> result 10)
(dcl-form-show ...)
)
); end defun
Via Events from the opened dialog I start others functions
(defun c:ondblclick ()
(close form)
(calculate something)
(show form)
)
Now the result is:
- the first call shows the dialog
- the doubleclick shows the dialogue for 1 ms and the closes it -> "result" is set to 2
I tried to track the error and thought that "show-form" is directly followed by "oninitialize". I suggest that in my oninitialize-code is the error, and I tried
(defun c:oninitialize ()
(alert "hello")
do something
..
)
I thought that the "alert" will show me that "onini" is just starting, but the dialogue is closed before the alert.
So:
a) What could be the reason?
b) What happens between "show form" and "oninitialize"?
Thanks and regards
Peter
EDIT:
In the meantime I changed to "modeless" dialogue, and there it works.
But nevertheless - should it work in "Modal" too?