popup?
Martin Baxter
mb.userev at harbourhosting.co.uk
Sun Nov 5 11:15:03 EST 2006
Robert Mann wrote:
> ask field "Prompt" titled "Enter your Comment!"
> put it into tcomment
>
> this seems to work?
>
>
> Robert Mann
Yes, though I might do this:
if it is not empty then
put it into tcomment
end if
# it will be empty if the user cancelled
# Although, in actual practice, when retrieving a value
# from "it" I always put the value into a temporary var
# immediately for safe keeping
put it into t_temp
# which I consider good practice because "it" can be
# changed by many other actions, and this way you get its
# value before anything else has a chance to change it
# so, my version would look like this
ask field "Prompt" titled "Enter your Comment!"
put it into t_temp
if t_temp is not empty then
put t_temp into tcomment
end if
HTH Martin Baxter
More information about the use-livecode
mailing list