Page 1 of 1

Stack and Answer Questions

Posted: Wed Feb 29, 2012 10:54 pm
by Jerryab
OS's are Windows and MAc

I have a main stack and another stack that is smaller and has a search routine.
It is asking a user for some search information and then query's the database
then it closes.

Is there a way to keep a user from selecting anything out side the smaller stack
until it is closed ? I don't want anything on the main stack selectable until
the search stack closes.

Is there a way to keep an ANSWER dialog in a particular place on the screen.

I have a very large screen and when the ANSWER dialog pops up it is in the
middle of the screen. Is there a way to keep it in the window of the program ?

Re: Stack and Answer Questions

Posted: Wed Feb 29, 2012 11:56 pm
by dunbarx
If you set the "cantModify" of your main stack to "true", you will lock out absolutely everything. Be careful, as you must manage this with openCard and closeCard (or the like) in order to set this property as you navigate to and from your smaller stack. Or, you can hide your main stack, again managed with those selfsame navigation messages, and this will certainly keep out any snoopers.

There is a way to hide the entire desktop, I think, but I don't remember how to do that. Someone else will.

Craig Newman

Re: Stack and Answer Questions

Posted: Thu Mar 01, 2012 3:04 pm
by Jerryab
Thanks Dunbarx for the responce but that did not work,
but I figured out that go stack bla, bla, bla as modal does the trick.

Code: Select all

go stack "SearchRoutine" as modal
I still need an answer:
Is there a way to keep an ANSWER dialog in a particular place on the screen.

I have a very large screen and when the ANSWER dialog pops up it is in the
middle of the screen. Is there a way to keep it in the window of the program ?

Re: Stack and Answer Questions

Posted: Thu Mar 01, 2012 3:17 pm
by dunbarx
I think that the native "answer" (and "ask") dialog boxes, though they can be moved manually once called, always appear initially at specific locations, and this is determined by whether you are on a Mac or a PC.

If you roll your own, and this is simple to do, you can also set its location under script control. A small stack that looks exactly like the standard one would do.

Glad you worked out your other issue. What did not "work"?

Craig Newman

Re: Stack and Answer Questions

Posted: Thu Mar 01, 2012 3:26 pm
by FourthWorld
Jerryab wrote:I have a very large screen and when the ANSWER dialog pops up it is in the
middle of the screen. Is there a way to keep it in the window of the program ?
On Windows and Linux the default behavior is to show the Answer dialog at the loc of the topstack, while on Mac the default is to show it in the standard alert location (horizontally centered, slightly above center vertically).

The default behavior is also application-modal, so all windows are blocked until the dialog is dismissed.

If you use the "as sheet" specifier, like this:

Code: Select all

answer "Hello world!" as sheet
...the dialog becomes window-modal only, so you'll see these changes:
- On Mac the dialog appears as a sheet, sliding down from the title bar and remaining centered horizontally within that window.
- On all platforms you'll be able to interact with other windows, as only the topstack will be blocked by the dialog.

Re: Stack and Answer Questions

Posted: Thu Mar 01, 2012 6:17 pm
by jacque
Jerryab wrote: Is there a way to keep a user from selecting anything out side the smaller stack
until it is closed ? I don't want anything on the main stack selectable until
the search stack closes.
Open the smaller stack as modal and it should do what you want:

modal "smallStack"