2018-03-28 20:49 UTC
Hi
I am not so very good at programming but i want programmer
to redesig a existing DCL dialog into a ODCL variant.
The first i did was to give the buttons the same name.
Could use some hint how to get the dialog started. Thanks upfront
ORIGINAL DCL :
LISP CODE PART:
I am not so very good at programming but i want programmer
to redesig a existing DCL dialog into a ODCL variant.
The first i did was to give the buttons the same name.
Could use some hint how to get the dialog started. Thanks upfront
ORIGINAL DCL :
HI_menu : dialog
{
label = " ";
:row {
: boxed_column
{
: row {
: button {
label = "KW - millimeter ";
alignment = left;
key = "SET_mm";
width = 8;
is_default = true;
}
}
: row {
: button {
label = "TBB - millimeter";
alignment = left;
key = "SET_tbb";
width = 8;
is_default = true;
}
}
: row {
: button {
label = "WE - meter ";
alignment = left;
key = "SET_m";
width = 8;
is_default = true;
}
}
: row {
: button {
label = "GEO - meter ";
alignment = left;
key = "SET_geo";
width = 8;
is_default = true;
}
}
}
}
: spacer { width = 2; }
: button {
label = "Cancel";
key = "cancel";
is_cancel = true;
width = 4;
fixed_width = true;
}
}
LISP CODE PART:
(vl-load-com)
(setvar 'cmdecho 0)
(vl-cmdf "_Opendcl")
(setvar 'cmdecho 1)
(defun c:HI_menu (/ OLDERR)
(graphscr)
(setq SETMS NIL
SETMMS NIL
SETGEOS NIL
SETTBBS NIL
CANCEL nil
) ;_ end of setq
(SETMMMENU)
(if SETMS
(cond ((= SEL 1) (SET_M)))
)
(if SETMMS
(cond ((= SEL 2) (SET_MM)))
)
(if SETGEOS
(cond ((= SEL 3) (SET_GEO)))
)
(if SETTBBS
(cond ((= SEL 4) (SET_TBB)))
)
(if CANCEL
(princ "\nPROGRAM CANCELLED!")
) ;_ end of if
(princ)
)
(defun SETMMMENU ()
(dcl-LoadProject "HI_MENU")
(action_tile "SET_m" "(SET_m) (done_dialog 1)")
(action_tile "SET_mm" "(SET_mm) (done_dialog 1)")
(action_tile "SET_geo" "(SET_geo) (done_dialog 1)")
(action_tile "SET_tbb" "(SET_tbb) (done_dialog 1)")
(action_tile "cancel" "(setq cancel t)(done_dialog)")
(start_dialog)
)
; ETC.
