value of dcl edit-box

StefVdM

Usenet Archive
Joined
Jul 4, 2003
Messages
21
Reaction score
0
Hi,

I have a dialog-box with various "edit_box"es. In the dcl-file I set the initial value of these boxes using the attribute "value".

In my lisp-file I then write (action_tile "Namebox" "(setq VAR $value)").

I was thinking that if the user did not change the preset value of the edit_box, that preset value would be assigned to the variable "VAR". Now it seems that values are not assigned unless the user explicitly enters something in the edit-box. So what's the use of the attribute "value" then? Or did I forget something?

Thanks in advance for your help,

Stef
 
You should associate one variable with each input tile, then before you set the tile's value, set the default symbol value, or do them both at the same time...

(set_tile "Tile1" (setq Tile1 "default"))
....
(action_tile "Tile1" "(setq Tile1 $value)")

I use the value attribute in a DCL only for testing appearances.

StefVdM said:
Hi,
I have a dialog-box with various "edit_box"es. In the dcl-file I set the
initial value of these boxes using the attribute "value".
In my lisp-file I then write (action_tile "Namebox" "(setq VAR $value)").

I was thinking that if the user did not change the preset value of the
edit_box, that preset value would be assigned to the variable "VAR". Now it seems that values are not assigned unless the user explicitly enters something in the edit-box. So what's the use of the attribute "value" then? Or did I forget something?
 
StefVdM,
You are on target as to what happens.
Before you initially set value to the edit boxes, just (setq VAR "attribute_value"). Then (set_tile "Namebox" VAR) to initially set the editbox(es). Then your (action_tile "Namebox" "(setq VAR $value)") should show any changes made to VAR by the user.

Bill
 
I like to use an initialization function to set the vars. and tiles. It helps me keep things organized especially when dealing with several tiles.

(defun edit_initialize (/ default_values)
(setq default_values
'(("ebox1" "default1")
("ebox2" "default2")))

(mapcar '(lambda (x)
(set_tile (car x)
(set (read (car x))
(cadr x))
)
)
default_values
)
)

StefVdM said:
Hi,
I have a dialog-box with various "edit_box"es. In the dcl-file I set
the initial value of these boxes using the attribute "value".
In my lisp-file I then write (action_tile "Namebox" "(setq VAR $value)").

I was thinking that if the user did not change the preset value of
the edit_box, that preset value would be assigned to the variable "VAR". Now it seems that values are not assigned unless the user explicitly enters something in the edit-box. So what's the use of the attribute "value" then? Or did I forget something?
 

Latest threads

Back
Top