我有以下 R3-GUI 脚本:
Rebol [
file: %context.reb
]
either exists? %r3-gui.r3 [do %r3-gui.r3][load-gui]
view [
title "First Window"
hgroup [
lab: label "fld 1 "
fld1: field "Field Data 1"
]
button "Display fld 1" on-action [if error? try [probe get-face fld1][alert "Can't read fld1"]]
button "Display fld 2" on-action [if error? try [probe get-face fld2][alert "Can't read fld2"]]
button "Open 2nd Window" on-action [
view [
title "Second Window"
hgroup [
label "fld 2" fld2: field "field 2 data"
]
button "Display fld1" on-action [if error? err: try [probe get-face fld1][probe err alert "Can't read fld1"]]
button "Display fld2" on-action [if error? err: try [probe get-face fld2][probe err alert "Can't read fld2" ]]
]
]
]
当我单击第二个窗口中的“显示 fld2”按钮以访问 fld2 的内容时,出现** Script error: fld2 word is not bound to a context
错误。这是什么原因?以及如何访问fld2
第二个窗口中的单词?