[ALLY] Passing variables from window to window Re:(3)
From: mike:yaunish:home at: 2-Aug-2000 21:53
At 10:37 AM 8/2/2000 -0400, you wrote:
Try this, it may be what you are looking for:
win-2: layout/offset [
across
text "letter 1 = " t1: text "x" return
text "letter 2 = " t2: text "x" return
text "letter 3 = " t3: text "x" return
text "letter 4 = " t4: text "x" return
] 30x100
win-1: layout/offset [ across text "Enter 4 letters:"
win-1-field: field "abcd" [
new-win-2: make win-2 [ do [ t1/text: win-1-field/text/1
t2/text: win-1-field/text/2
t3/text: win-1-field/text/3
t4/text: win-1-field/text/4
]
]
view/new new-win-2
]
] 30x30
view win-1
>Mike,
>
>I guess I am a poor explainer of my problem.
>
>A better explanation of my problem is:
>
>I get a field in win-1
>Based on the contents of that field, I read a config file
>and get the matching record.
>>From that record, I get 4 new variables. ;so far, so good
>
>I want to display the contents of those 4 new variables
>in win-2 as text or labels.
>
>You got me closer, but still no banana.
>
>TIA,
>
>Greg Piney
>S&P Web Engineering
>
>[mdb--gci--net] on 08/01/2000 07:04:23 PM
>
>Please respond to [ally--rebol--com]
>
> To: [ally--rebol--com]
>
> cc: (bcc: Greg Piney/McGraw-Hill/US)
>
> Subject [ALLY] Passing variables from window to window
> : Re:
>
>Greg,
>
>This code should do what you want, with the entered name showing up in
>label1 in win-2. Note however that i had to initialise label1 with all
>those x's, it won't work if you don't ??
>
>Mike.
>
>REBOL []
>
>win-1: layout [
> size 400x100
> across
> label "Enter your name?"
> you-are: field 75x20
> return
> button "OK!" [
>
> view/new win-2
> label1/text: you-are/text
> show label1
> ]
> ]
>win-2: layout [
> across
> label "Hello"
> label1: label "xxxxxxxxxxxxxxxxxxxx"
> return
> button "ok" [quit]
>]
>system/view/vid/vid-feel/focus you-are
>view win-1
>
Mike Yaunish
[mike--yaunish--home--com]