As the other answers show, you only use one line for your message and should be copied.
As for the other problem - you should take a look at the code you are generating (as I suggested elsewhere, you can put a little PROBE bit to check the output of the COLLECT function):
[ t: text "message number: 1" field "entry" button "Click" [t/text: "clicked"] return t: text "message number: 2" field "entry" button "Click" [t/text: "clicked"] return t: text "message number: 3" field "entry" button "Click" [t/text: "clicked"] return t: text "message number: 4" field "entry" button "Click" [t/text: "clicked"] return t: text "message number: 5" field "entry" button "Click" [t/text: "clicked"] return t: text "message number: 6" field "entry" button "Click" [t/text: "clicked"] return t: text "message number: 7" field "entry" button "Click" [t/text: "clicked"] return t: text "message number: 8" field "entry" button "Click" [t/text: "clicked"] return t: text "message number: 9" field "entry" button "Click" [t/text: "clicked"] return t: text "message number: 10" field "entry" button "Click" [t/text: "clicked"] return ]
As you can see, you are constantly reassigning t so that in the end it applies only to the last person.
There are several options here - the most noticeable is the creation of the name to which you assign text face to. Within the FOREACH loop:
keep compose/deep [ (to set-word! rejoin ["t-" i]) text (rejoin ["Message Number: " i]) field "entry" button "Click" [ set in (to word! rejoin ["t-" i]) 'text "clicked" ] return ]
Note that to simplify the creation of the block, I used this line:
set in (to word! rejoin ["t-" i]) 'text "clicked"
This means (in the first case):
set in t-1 'text "clicked"
IN returns the given word ( 'text ) associated with the given context (object face t-1 ), which is then SET until "clicked" .
UPDATE
This method does not even use the name of the word, it simply uses a common parent to connect the button to the label:
view collect [ keep [below space 0x0] foreach i myRange 10 [ keep compose/deep [ panel [ origin 0x0 text (rejoin ["Message Number: " i]) field "entry" button "Click" [face/parent/pane/1/text: "clicked"] ] ] ] ]
source share