Stack and Answer Questions

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Jerryab
Posts: 12
Joined: Fri Jan 13, 2012 1:49 am
Contact:

Stack and Answer Questions

Post by Jerryab » Wed Feb 29, 2012 10:54 pm

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 ?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Stack and Answer Questions

Post by dunbarx » Wed Feb 29, 2012 11:56 pm

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

Jerryab
Posts: 12
Joined: Fri Jan 13, 2012 1:49 am
Contact:

Re: Stack and Answer Questions

Post by Jerryab » Thu Mar 01, 2012 3:04 pm

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 ?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Stack and Answer Questions

Post by dunbarx » Thu Mar 01, 2012 3:17 pm

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Stack and Answer Questions

Post by FourthWorld » Thu Mar 01, 2012 3:26 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Stack and Answer Questions

Post by jacque » Thu Mar 01, 2012 6:17 pm

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"
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply