Sarah Reichelt sarahr at
Wed Feb 20 17:26:01 EST 2002

> Problem 1:
> The answer dialog box appears to be off screen (v1.1 and 1.1.1B1). Screen res
> 640x480 Mac OS 9.2.2,PB G3.  Don't know how to reference 'answer dialog box'
> so that  it can be used in the msg box to set the location say to 200,200. Ex:
> set the loc of '?' to 200,200.  Is this a bug?  Ask dialog box appears ok.
You can read the loc using
    put the loc of stack "Answer Dialog"
but unlike in HyperCard, it doesn't seem possible to change it. The script
gives no error but setting the loc doesn't stick.

The following script moves the dialog, but as soon as the answer command
executes, the window leaps back to the middle of the screen.

on mouseUp
  go stack "Answer Dialog"
  set the loc of window "Answer Dialog" to "250,200"
  wait 30 ticks  -- so you can see what happens
  answer "Help"
end mouseUp

> Problem 2:
> The ask dialog box (using ask instead of answer) not only doesn't appear using
> the following script but the script only goes as far as 'go stack "a" and the
> stack is opened ok.  If I eliminate ref to 'ask' lines, the script works ok.
> Is the script alright or is this a bug?
> on startUp
>   if "x" is in fld "y" of stack "z" then
>     go stack "a"
>     wait 2 seconds
>     ask "what is this?"
>     if it is "OK" then set the visible of stack "a" to false
>     wait 2 seconds
>     set the visible of stack "a" to true
>   end if
> end startUp

This worked OK for me, but when using an ask dialog, 'it' refers to whatever
you typed in the field, not to the button you clicked. Just clicking 'OK',
without entering any data leaves the stack visible, Type in 'OK' and then
click the 'OK' button and the stack disappears for 2 seconds.


More information about the use-livecode mailing list