[ALLY] Re: Change in Inform behaviour
From: gjones05:mail:orion at: 17-Apr-2001 11:16
From: "Mike Yaunish"
> The example script below use to work with the old Beta version of
> View - but now after you enter text into the requester, nothing
> makes it's way back to the main window. I am not sure what I
> need to change to make it work. If there is a better way to do this
> I would appreciate knowing what it is.
>
> my-fun: func [] [
> ret-val: copy ""
> my-req: layout/size [
> text "Enter something:"
> f: field [ ret-val: copy f/text
> unview/only my-req ]
> ] 300x80
> inform my-req
> ret-val
> ]
>
> view main: layout [ text "Main Window"
> button "open requester" [
> the-ret-val: my-fun
> print [ rejoin [ "requester returned = {" the-ret-val "}" ]]
> main-field/text: the-ret-val
> show main-field
> ]
> main-field: field ""
> ]
Hi, Mike,
Change:
unview/only my-req
to:
hide-popup
And it should work. Complete changed code below.
--Scott Jones
=============
my-fun: func [] [
ret-val: copy ""
my-req: layout/size [
text "Enter something:"
f: field [ ret-val: copy f/text
hide-popup]
] 300x80
inform my-req
ret-val
]
view main: layout [ text "Main Window"
button "open requester" [
the-ret-val: my-fun
print [ rejoin [ "requester returned = {" the-ret-val "}" ]]
main-field/text: the-ret-val
show main-field
]
main-field: field ""
]