Store the value in the block instead of the sign of the word that represents it

I am trying to save several string values ​​in a block in order to save this block in a text file. I get these values ​​from the form using VID.

One way to do this is to simply save the lines in a file. But I would rather get the data as a block.

This is what I intend to do:

view layout [
    contact-name: field
    save-button: btn "Save" [
        saved-data-block: copy []
        append saved-data-block [[contact-name: contact-name/text]] ;problem here
        save my-file saved-data-block
    ]
]

To enter a type Rebol Userin a name field, the content stored in the file should be something like [contact-name: "Rebol User"], but the content[contact-name: contact-name/text]

I understand that the problem is that the block is not evaluated as code at the time it was added to saved-data-block. What can I do to save a string value in a text file in a blocky way? Should I do something else for this? Any comments / requests are welcome.

+5
4

, compose , " ". , . , :

append/only saved-data-block compose [contact-name: (get-face contact-name)]

Compose , . , .

+3

Grahams : -)

append/only saved-data-block reduce [ to-set-word 'contact-name get-face contact-name ]

"" , ! .

, - ! ' .

!, .

+3

:

append/only saved-data-block repend [contact-name:] get-face contact-name 

-: , !, .

, .

+3

Reduce will also reset the field name, which is also the "contact name".

So that would be better

append/only saved-data-block reduce [ to-set-word contact-name get-face contact-name ]
+1
source

All Articles