PDA

View Full Version : Nested Dialog Boxes



KIRK_FORGUE
2009-03-10, 04:06 PM
Why do my nested dialogs not appear until I exit and restart the routine? then everything is fine!

andrea.andreetti
2009-03-13, 04:05 AM
Why do my nested dialogs not appear until I exit and restart the routine? then everything is fine!

Bad location parenthese..



(setq dcl_id (load_dialog "qpt2.dcl"))
(if (not (new_dialog "main" dcl_id))
(exit) ;; ) <- HERE PARENTHESE TO REMOVE
(progn
(mode_tile "p_1" 1) ;Disables button
(mode_tile "p_2" 0) ;Enabled but off
(mode_tile "p_3" 2) ;Enabled and selected
(action_tile "pnorm" "(size)")
(action_tile "chkpt" "(check)")
(action_tile "11x17" "(PICKED1 $value $key)")
(action_tile "pdf" "(PICKED1 $value $key)")
(action_tile "eps" "(PICKED1 $value $key)")
(action_tile "cancel" "(done_dialog) (setq userclick nil)")
(action_tile "accept" "(done_dialog) (setq userclick T)")
(start_dialog)
(unload_dialog dcl_id)
(princ)
)) ;; <-HERE NEW PARENTHESE

KIRK_FORGUE
2009-03-13, 12:58 PM
Hi Andrea: I did what you instructed and it still gives me "; error: no function definition: SIZE" when I first run it. if I cancel and come back to it it's fine.... Could it have something to do with Flags I've seen this with dcl_id"numbers"?

TimSpangler
2009-03-13, 04:12 PM
You must do the same thing on the other 2 sub routines (check) (size)

Then it seems to work great.

KIRK_FORGUE
2009-03-13, 07:06 PM
Tim, your icon looks like me right now! I fixed all 3 (main) (check) & (size) and it still doesn't load til I cancel, I'm using AutoCAD 2007 Mechanical, and Autocad 2004 at home with the same results... I tried this code and (size) loaded the first time but then (check) wouldn't do anything nor would any commands after hitting OK!

(if (< (setq dcl_id2 (load_dialog "qpt2.dcl")) 0)
(exit)
)
(if(new_dialog "size" dcl_id2)
(progn

can you explain what the less than 0 means?

TimSpangler
2009-03-13, 07:30 PM
here ya go. There were some if's that needed to be cond and a few nested commands that needed a few ( )

This seems to work on my end.