PDA

View Full Version : help on a little DCL


nicgosselin_so_hot
2009-04-16, 03:01 AM
here a little dcl file, in the lisp i don't remember how to return the value entered in the edit box

thank you all !

th dcl :
------------------------------------------------------------------------------
zza : dialog{
label = "zza - bla bla";
:edit_box{
key = "handle";
label = "Handle de la metavue :";
fixed_width = true;
edit_width =6;
}
ok_cancel;
}

the lisp
-------------------------------------------------------------------------------
(defun c:zza ()
;zoom sur la métavue en entrant son handle
(setq dcl_id (load_dialog "zza.dcl"))
(if (not (new_dialog "zza" dcl_id))
(progn
(alert "The ZZA.DCL file was not found!")
(exit)
)
)
(start_dialog)
<------------- ?
(setq ent (handent handle))
(setq ss (ssadd))
(ssadd ent ss)
(sssetfirst ss ss)
(command "zoom""object")
(princ)
)

kozmosovia
2009-04-16, 03:35 AM
you need to add action_tile before running (start_dialog) and filter cancel button.


...
(action_tile "handle" "(setq handle $Value)")
(if (and (= (start_dialog) 1) ;; OK pressed
(setq ent (handent handle)) ;; Entered handles is correct
)
(progn
(setq ss (ssadd))
....

howardjosh
2009-04-16, 02:42 PM
Kozmosovia was right on the money... I did a search in an old routine and dug up this line:

(action_tile "selection" "(items_Action $key $value)")


and it was one of the first things I declared in the defun (function)