Strange behavior from Check Selections

#1
I working on my piping add-on lisp to have individual dialogs for each of the main selection catagories.
For each child dialog I want to have a 'check selection' loop to ensure that ALL appropriate selection have been set.
However on one dialog, (Flanges) one selection fails unless the user selects OK before making a selection.
The 'Fittings' dialog works fine.
This video will help explain, I hope.
https://www.dropbox.com/s/97xic090cgyz5 ... e.avi?dl=0

My question is 'what is wrong'?

Here is the 'check selection' code:

Code: Select all

;-----------------------------------------------------------------------;
(defun CHECK_SELECTIONS_FLG ()
	(cond
		((/= n_flg NIL)(setq flg n_flg)(CHECK_SELECTIONS_FLGFCE))
		(t (alert "OOPS! *flanges dialog* SELECT A FLANGE TYPE - TRY AGAIN!"))
	);end of cond
) ;end CHECK_SELECTIONS_FLG
;----------------------------------------------------
(defun CHECK_SELECTIONS_FLGFCE ()
	(cond
		((/= n_fce NIL)(setq fce n_fce)(CHECK_SELECTIONS_FLGCLS))
		(t (alert "OOPS! *flanges dialog* SELECT THE FLANGE FACE - TRY AGAIN!"))
	);end of cond
) ;end CHECK_SELECTIONS_FLGFCE
;----------------------------------------------------
(defun CHECK_SELECTIONS_FLGCLS ()
	(cond
		((/= n_clss NIL)(setq clss n_clss)(CHECK_SELECTIONS_FLGSCH))
		(t (alert "OOPS! *flange dialog* SELECT A FLANGE CLASS - TRY AGAIN!"))
	);end of cond
) ;end CHECK_SELECTIONS_FLGCLS
;----------------------------------------------------
(defun CHECK_SELECTIONS_FLGSCH ()
	(cond
		((/= n_sch NIL)(setq clss n_clss)(CHECK_SELECTIONS_FLGSZ))
		(t (alert "OOPS! *flange dialog* SELECT A FLANGE SCHEDULE - TRY AGAIN!"))
	);end of cond
) ;end CHECK_SELECTIONS_FLGSCH
;----------------------------------------------------
(defun CHECK_SELECTIONS_FLGSZ () 
   (cond 
		((/= size NIL)(done_dialog)) 
		(t (alert "OOPS! *flange dialog* SELECT A FLANGE SIZE - TRY AGAIN!"))
  );end of cond 
) ;end CHECK_SELECTIONS_FLGSZ
;----------------------------------------------------
The action tile statement for the radio button is:

Code: Select all

;-----------------------------------------------------------------------;
(action_tile "rb41"										;toggle SCH5 option
		(strcat
			"(setq newtile $key)"	
			"(RB41_FLAG)(F_NAME)(READ_DIM_FILE)(FLG_SCH_5)"
		); end strcat
	); END ACTION TILE
;-----------------------------------------------------------------------;
Files attached for info, the Flange dialog is at the endof the lisp.
SteveN
Attachments
SLN_PIPING2.zip
(37.73 KiB) Downloaded 91 times