Alert box closing main dialog

#1
Hi,
I'm adding a 'check selection' loop into my piping utility, but while one works another does not!
Here's a video, where the first alert works as expected in that when you select 'OK' the alert box closes allowing the user to correct their mistake.
But the second alert, when the user selects 'OK' it closes bothe the alert & the main dialog, and I can't seem to find why?
https://www.dropbox.com/s/ieqkq2p1btczu ... e.avi?dl=0.

lsp file attached.

SteveN
Attachments
nest-fittings.zip
(2.21 KiB) Downloaded 189 times

Re: Alert box closing main dialog

#3
Solved my problem, re-wrote the check selections into 3 descrete sections:

Code: Select all

(defun CHECK_SELECTIONS_FE ()
	(cond
		((/= fit_ftg NIL)(setq john fit_ftg)(CHECK_SELECTIONS_F))
		((/= ftg NIL)(setq john ftg)(CHECK_SELECTIONS_F))
	);end cond
) ;end CHECK_SELECTIONS_FE
;
(defun CHECK_SELECTIONS_F ()
;
	(setq ftg john)
	(setq john "")
;
  (cond
		((/= fit_sch NIL)(CHECK_SELECTIONS_FSC))
		(t (alert "OOPS! *new dialog* SELECT A FITTING SCHEDULE - TRY AGAIN!"))
  );end of cond
) ;end CHECK_SELECTIONS_F
;
(defun CHECK_SELECTIONS_FSC () 
;
	(setq sch fit_sch)
	(setq fit_sch "")
; 
   (cond 
		((/= size NIL)(term_dialog))
		(t (alert "OOPS! *new dialog* SELECT A FITTING SIZE - TRY AGAIN!"))
  );end of cond 
) ;end CHECK_SELECTIONS_FSC
Once each one is passed it calls the second.
The 2 setq's in the second and third checks are setting variables for the main app.

SteveN