How to put dialog box on top?

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
grovecat
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 99
Joined: Thu Aug 04, 2011 10:32 am

How to put dialog box on top?

Post by grovecat » Sat Jul 07, 2012 4:20 am

Is it possible to make a dialog box appear on top of other application windows? I know I can make the stack stay on top of everything with "set the systemWindow of this stack to true", but I want the user to be able to run other applications and still be alerted when a timed event occurs within my app.

TIA
Don

grovecat
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 99
Joined: Thu Aug 04, 2011 10:32 am

Re: How to put dialog box on top?

Post by grovecat » Sat Jul 07, 2012 4:26 am

On further reflection I guess I can set the systemWindow of this stack to true when the dialog box is triggered (because I do want the user to see something on the card anyway) and have a Hide button that sets the system window back to false.

Is there any better way?

Cheers
Don

grovecat
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 99
Joined: Thu Aug 04, 2011 10:32 am

Re: How to put dialog box on top?

Post by grovecat » Sat Jul 07, 2012 4:36 am

Well, I tried that and the problem is that the dialog box is hidden behind the card even though I bring up the dialog after setting the system window. I could offset the card on the screen but that is a really clumsy kludge.

So my original question stands.

Cheers
Don

Klaus
Posts: 14206
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How to put dialog box on top?

Post by Klaus » Sat Jul 07, 2012 11:25 am

Hi Don,

maybe you could bring your app to front when neccessary?

Check this page (and the other pages on that site!):
http://www.sonsothunder.com/devres/live ... roc001.htm

Or do not use the build in "Ask/Anser" dialogs but create your own and set
that new stack to SYSTEMWINDOW when neccessary?

Just guessing, since I have no idea about your app :D

Best

Klaus

grovecat
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 99
Joined: Thu Aug 04, 2011 10:32 am

Re: How to put dialog box on top?

Post by grovecat » Sun Jul 08, 2012 12:39 pm

Hi Klaus

Thanks for the information.

It looks like Applescript is the way to go. The problem with the systemWindow approach is that the application itself does not come to the front, so to interact with a button on that window the user has to switch to the application first, which is a bit non-intuitive.

There does not seem to be much information about Applescript usage in the LC User Guide or the Dictionary, but Google helps as usual.

Cheers
Don

Post Reply