dialogues in non-gui code

Bijan Parsia bparsia at email.unc.edu
Sat Dec 11 05:07:23 UTC 1999


At 8:23 PM -0500 12/10/99, Lex Spoon wrote:

[snip]
>The ideal solution would be to have the popups when the UI is around,
>and not to have the popups when it isn't.  Perhaps exceptions would work
>for this?  The UI defines special exception handlers for cases like
>file-not-found, and non-UI code can simply catch the exception itself.
>Has anyone worked in a system that takes this approach?
>
>The bad thing is that, even if people buy it, it means rewriting a bunch
>of code.  #error: has 751 senders :(

Of course, #error: has only one implementor :) (Ok, two, but I'm not
counting the second one, so it's only one!)

Default case you could record to a log file and move on.

More interestingly, you could define a table of the error strings, and put
the appropriate handler there. That might not be too bad, for most cases.

The default could be to try proceeding and if it didn't work again, give
up. (That's often what I do :))

Cheers,
Bijan Parsia.





More information about the Squeak-dev mailing list