Shoeists:

Here's a nice little issue:

  animate 5 do
    alert('yo?')
  end

You can't easily escape from that. This is not an issue for end-users, if their programmers are careful, but it is indeed an issue for programmers, who should be encouraged to write alert() anywhere, without remembering if they are somewhere inside an animate{}.

The workaround is to escape the dialog (Gtk) and immediately click the window's close button.

The best fix I have seen, in old script environments like UEdit, is...

 - all "requestors" have a cancel button
 - the cancel button raises a special exception
 - the environment (in this case the app object containing
    the animation) silently absorbs the exception
 - the animation would stop

That pattern allows Cancel to gracefully roll-back any committed user action.

--
  Phlip

Reply via email to