[ALLY] Text in and out of an area Re:
From: allenk:powerup:au at: 14-Sep-2000 12:51
----- Original Message -----
From: <[gregco--pressroom--com]>
To: <[ally--rebol--com]>
Sent: Thursday, September 14, 2000 12:00 PM
Subject: [ALLY] Text in and out of an area
> I haven't been able to come up with a way to send a string of text to a
view
> area for editing and then retrieve it for further processing.
>
> In other words, I want to:
>
> 1. Create a face with a text area.
>
> 2.Create a string of text programmatically.
>
> 3. Send that text string to the area for manual editing.
>
> 4. Retrieve the edited text for further program manipulation.
>
> No doubt there is a simple answer to this, but I haven't found it in the
> docs or by trial and error.
>
> Any ideas?
>
> Greg Coughlan
>
Hi Greg,
I think these demos might help. Needs xper 0.10.33. (execution in the main
script is halted until the popup is closed.)
Cheers,
Allen K
REBOL []
edit-text: func [data [string!]][
inform layout [text-area: area copy data button "Close" [hide-popup]]
text-area/text
]
; demo1 running from script (with no initial view window)
old-string: copy "Demo1 string"
new-string: edit-text old-string
print ["Old-String - " old-string "^/" "New-String - " new-string]
; demo2 ; running from another view window
old-string: copy "Demo 2 string"
view layout [button "click" [
new-string: edit-text old-string
print ["Old-String - " old-string "^/" "New-String - " new-string]
]
]
halt