Welcome to the Southern African Autolisp Website.
You are Visitor Number since 21st June 1999.
key

A List of Keys
This attribute specifies an ASCII name that your programme uses to refer to a
specific tile. It must be a quoted string (no default) and is case sensitive.
("eb1" does not equal "Eb1").
Each key value MUST be unique within a dialogue definition.
DCL Code Sample
lisp49i : dialog { //dialog name
label = "key"; //give it a label
: edit_box { //define edit box
key = "eb1"; //give it a name
label = "Edit Box 1"; //give it a label
width = 40; //give it a width
fixed_width = true; //fix the width
value = "Enter a Number and press Tab"; //give it a value
} //end edit box
: edit_box { //define edit box
key = "eb2"; //give it a name
label = "Edit Box 2"; //give it a label
width = 40; //give it a width
fixed_width = true; //fix the width
value = "Enter a Number and press Tab"; //give it a value
} //end edit box
: edit_box { //define edit box
key = "eb3"; //give it a name
label = "Edit Box 3"; //give it a label
width = 40; //give it a width
fixed_width = true; //fix the width
value = "Enter a Number and press Tab"; //give it a value
} //end edit box
: edit_box { //define edit box
key = "eb4"; //give it a name
label = "Key Edit Box 1"; //give it a label
width = 40; //give it a width
fixed_width = true; //fix the width
} //end edit box
: edit_box { //define edit box
key = "eb5"; //give it a name
label = "Key Edit Box 2"; //give it a label
width = 40; //give it a width
fixed_width = true; //fix the width
} //end edit box
: edit_box { //define edit box
key = "eb6"; //give it a name
label = "Key Edit Box 3"; //give it a label
width = 40; //give it a width
fixed_width = true; //fix the width
} //end edit box
spacer; //define spacer
ok_cancel ; //predefined OK/Cancel button
} //end dialog
AutoLisp Code Sample
(defun C:lisp49i ()
;define function
(setq dcl_id (load_dialog "lisp49i.dcl"))
;load dialog
(if (not (new_dialog "lisp49i" dcl_id)
;test for dialog
);not
(exit)
;exit if no dialog
);if
(mode_tile "eb1" 2)
(mode_tile "eb1" 3)
(action_tile "eb1"
;if this tile is selected
"(setq a $key)
;retrieve it's name
(set_tile \"eb4\" a)"
;set the tile 'eb4' to it's name
)
(action_tile "eb2"
;if this tile is selected
"(setq b $key)
;retrieve it's name
(set_tile \"eb5\" b)
;set the tile 'eb5' to it's name
(mode_tile a 1)"
;switch off the tile 'eb2'
)
(action_tile "eb3"
;if this tile is selected
"(setq c $key)
;retrieve it's name
(set_tile \"eb6\" c)"
;set the tile 'eb6' to it's name
)
(action_tile
"accept"
;if O.K. pressed
"(done_dialog) (setq userclick T)"
;close dialog, set flag
);action tile
(action_tile
"cancel"
;if cancel button pressed
"(done_dialog) (setq userclick nil)"
;close dialog, lower flag
);action_tile
(start_dialog)
;start dialog
(unload_dialog dcl_id)
;unload
(if userclick
;if OK selected
(alert "You selected OK")
;inform the user
(alert "You selected Cancel")
;inform the user
);if
(princ)
);defun
(princ)
All Tutorials and Code are provided "as-is" for purposes of instruction and
utility and may be used by anyone for any purpose entirely at their own risk.
Please respect the intellectual rights of others.
All material provided here is unsupported and without warranty of any kind.
No responsibility will be taken for any direct or indirect consequences
resulting from or associated with the use of these Tutorials or Code.
Copyright © 1999 by
Kenny Ramage
All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage.
|