On Aug 13, 2010, at 4:01 57AM, Schwab,Wilhelm K wrote:
>
> Another important feature would be to automatically save the mask rather than expecting the user to do that explicitly. How can I detect that the morph/panel is about to close and execute a command? If I wanted to do so, how could I detect that the mask has not been saved, and warn the user and/or veto closing the morph? For now I would be happy to just save the mask, but stopping something from closing will eventually arise.
>
> Bill
Take a look at SystemWindow >> delete, there are plenty of hooks.
Implementing #okToClose on your windows' model in terms of checking for/ saving changes to the mask would probably be what you want.
As for detecting changes, if all masks are in the same format, and you don't plan on doing this for masks > 2000@2000 interactively, a simple "aForm bits = anotherForm bits" would probably perfom well enough.
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project