"exit to top" within modal: bug or misconception?

Kay C Lan lan.kc.macmail at gmail.com
Tue Mar 10 20:06:05 EDT 2009


On Tue, Mar 10, 2009 at 10:59 PM, Richard Gaskin <ambassador at fourthworld.com
> wrote:

>
> Turns out this behavior is the same with custom modals as well.
>
> So when should "exit to top" be honored?  Is my expectation that it should
> be honored within a modal unreasonable, or is this a bug?
>
> Perfect timing, I just experienced this problem with one of my Stacks and
had to Force Quit to prevent essential data being changed when I didn't want
it to be.

In my case I considered that it had been an error on my part to not provide
a "Cancel" button as an option.

So I'd rephrase the question, in what circumstances do you consider you NEED
to provide the option to 'exit to top' but CAN'T provide a Cancel button to
do so.

My memory is fading, but I believe in HC you either selected 'Can't Abort'
to On or Off. With it Off cmd-. didn't work, with it On it worked anywhere
and everywhere no matter the User Level.  IMO I can see cases where you
don't want to allow a user to Quit mid process and I guess you do too as you
only want to allow Quiting when in the IDE, so why not:

on mouseUp
 repeat 5
 if ("Dev" is the environment) then
   answer "test" with "Cancel" or "OK"
     if it is "Cancel" then exit to top
 else
   answer "test"
 end if
 --rest of script here
 end repeat
end mouseUp

Simple if you only want a couple of these, not so if you want a generic
solution for every answer dialog that pops up.

Again, if my recolection of HC is correct it seemed to be All or Nothing,
Rev seems to offer a more 50/50 solution and allows you to script in the
rest.

My 2 mites worth



More information about the use-livecode mailing list