This is great for the end user because it does not look as cryptic as...
... but it is a bit of a nightmare to debug if you want to find out where in the code this condition was raised. The cryptic dialog would have been nice because then you could "Show traceback" and continue your investigation from there.
Well, you can also force a traceback with the "nicer" error message if you have access to a MagikSF prompt (typically through emacs). You need to put a !traceback!() call in basic_window.show_alert() to get a look at the callstack to find out where the problem was. Unfortunately, this method is not shipped with CST 4.0, so you will need to do some Magik to force a traceback.
(By the way, the topic of shipped/unshipped code and the Open Source "movement" in the Smallworld community will be covered soon in another article).
1. save the original basic_window.show_alert() method's procedure
MagikSF> orig_proc <<
2. temporarily redefine the method to show a traceback
MagikSF> _method basic_window.show_alert(_gather args)
3. Redo the GUI action that cause the user error dialog in the first place. Because of how we redefined the :show_alert() method above, we will not see the error dialog, but we will see the traceback at the command line. Use that traceback to investigate the problem further.
4. revert the basic_window.show_alert() method to its original procedure
value << orig_proc
As always, if you have any questions or comments about a post, please feel free to e-mail me or reply with a comment to this post.
Now, back to digging out from another blizzard :)