[REBOL] Pointer, values in Forms? Was: Editing fields of a record in forms? - second problem
From: yvan_iigs:gmx at: 10-Sep-2007 11:45
I like to thank the person who told me to read the sources and to use
do-events. Unfortunately I don't remember who it was.
Now the function works but it doest something that it shouldn,t. Here again
the basic idea.
What it should do is the following:
1. I have a block a with a string in it
2. Edit-ActorRole should open a form with the value of the string in block a
and let the user edit it if he wants.
3. The edited string should be returned to block b, letting block a
Part 3 does not work
b: Edit-ActorRole a
but the value of a is also changed and this should not be,
== [["Yvan"]] ; this is good, the value Ichanged it in the form
== ["Yvan"] ; this should not be
here the code.
Edit-ActorRole: func [ actor-block [block!]
l-act-role-block: copy 
; I use the copy function to be sure not to use a pointer.
l-actor-block: copy actor-block
if (l-actor-block/1 = none) [append l-actor-block ""]
Formular: view/new layout
text "Actor 1:" Fact1: field l-actor-block/1
l-actor-block: copy 
if not (Fact1/text = "") [append l-actor-block Fact1/text]
append/only l-act-role-block l-actor-block
Mit freundlichen Gr=FCssen