Frontscript to simulate modal dialog

Ken Ray kray at sonsothunder.com
Fri May 21 17:02:06 EDT 2004


Frank,

The only thing you can do about this AFAIK is to have a resumeStack handler
on the other windows that have code that checks to see if the progress
window is in open, and if so, to re-open the progress bar window (which will
bring it to the front). You'll have an odd "toggle" sort of situation going
on (where for a fraction of a second the dialog is submerged), but it'll
keep people from messing up other windows.

Another option is to use a palette window for your progress bar and have
each "normal" window have a transparent button that sits in front of
everything else on that window. Normally it is hidden, but when the progress
bar is going it becomes visible. When the progress bar goes away, this
button is hidden again. This prevents "submarining" of the progress window
(since it's a palette), and also prevents clicks on the other windows (since
the transparent button gets in the way).

HTH,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/


> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Frank Leahy
> Sent: Friday, May 21, 2004 6:04 AM
> To: use-revolution at lists.runrev.com
> Subject: Frontscript to simulate modal dialog
> 
> 
> Hi,
> 
> I tried Sarah's suggestion of creating a frontscript that 
> would allow a 
> progress dialog to act like a modal dialog does (can't bring other 
> windows to the front, etc.).  Here's the script I tried:
> 
> 
> on mouseDown
>    put the rect of window "Thumbnail Progress" into theRect 
> -- this is 
> the progress dialog window
>    put the screenMouseLoc into theLoc
>    if theLoc is within theRect then
>      pass mouseDown
>    else
>      beep
>    end if
> end mouseDown
> 
> For some reason this doesn't seem to work.  I hear the beeps, but it 
> doesn't seem to stop the mouseDown's from going to other 
> windows, e.g. 
> I can still bring other windows to the front.
> 
> Any suggestions?
> 
> Thanks,
> -- Frank
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 




More information about the use-livecode mailing list