I'm also not very keen on inlined error messages. I have the habit of pressing Alt-s twice in rapid succession, the first time the red borders disappears but I only notice the second time when the whole edit box flashes (or perhaps I just have a need to double check anyway). This extra keystroke seems to pay off against the frustration of debugging code I've forgotten to save but you'll understand that things go badly wrong when the first Alt-s generates an inlined error message.
Besides, having text inserted in your code can feel intrusive and having to press delete before you can edit your code doesn't seem make much cognitive sense. It's not that it's hard work, it's just the wrong kind of work! There's also a bit of inconsistency in that using an undefined variable in your code brings up a message box rather then an inlined message. Completely logical, but inconsistent never-the-less.
Using inlined error messages seems to be the simplest solution to the problem and as a proponent of Occam's razor, I can live with it. Somewhere down the line we should look at better ways though, because as Einstein warns:
"Everything should be made as simple as possible, but not simpler."
Cheers, Wiebe
-----Oorspronkelijk bericht----- Van: Jim Benson [mailto:jb@speed.net] Verzonden: 13 May 2001 02:35 Aan: squeak@cs.uiuc.edu Onderwerp: Re: Squeak textbox and events.
I'll assume that you mean you have gotten an error message while compiling a method. Two things here. First, notice that the error is highlighted (selected). In order to delete the error message, a one kestroke sequence is required. Second, in order to recompile and save the code, you must fix your error, which will require you to edit the text. If you are going to edit the text anyway, an extra keystroke does not seem to be a major penalty.
We have the tools to do something that might feel more natural, at least to someone unused to the Smalltalk Paragraph Editor. That is: we have balloons, as used in balloon help. It seems to me a balloons would be a natural place to put an error message. What I can't figure out is: when is the "natural" time to make the balloons disappear? Probably not when you first put the cursor at the offending place, because you may not have fully read the contents yet. But while you are editing, the balloon would be in the way. It seems that in lined error messages that I can read or delete at will have advantages.
At 12:29 +0200 2001.05.13, Wiebe Baron wrote:
Besides, having text inserted in your code can feel intrusive and having to press delete before you can edit your code doesn't seem make much cognitive sense. It's not that it's hard work, it's just the wrong kind of work! There's also a bit of inconsistency in that using an undefined variable in your code brings up a message box rather then an inlined message. Completely logical, but inconsistent never-the-less.
Using inlined error messages seems to be the simplest solution to the problem and as a proponent of Occam's razor, I can live with it. Somewhere down the line we should look at better ways though, because as Einstein warns:
"Everything should be made as simple as possible, but not simpler."
Andrew
[ On Sunday, May 13, 2001 at 11:07:51 (-0700), Andrew P. Black wrote: ]
Subject: RE: Squeak textbox and events.
We have the tools to do something that might feel more natural, at least to someone unused to the Smalltalk Paragraph Editor. That is: we have balloons, as used in balloon help. It seems to me a balloons would be a natural place to put an error message.
That may not be so bad an idea.... If the compiler were taught to continue on and find more likely errors after re-syncing with the next something that it can understand again then a novice who makes lots of errors might end up with a really cool-looking code pane.... :-)
They shouldn't look like help balloons though -- maybe more like a puffer-fish or something equally spiked or sharp-cornered, and they should have more explicit arror-shaped pointers to indicate the exact location of the error. And of course they should be some colour appropriate to warnings or danger (which as we should know by now must be something that can be adjusted by preference since all the world's not North America... :-).
Sort of like an editor annotating a paper manuscript with sticky-notes.
This would in effect be something like what I once thought of a long long time ago when I first encountered Smalltalk. Indeed back then I thought of the inserted warning message in something like this way because it was already selected and could thus be instantly eliminated again.
Coming back to Smalltalk again now I do find that I often forget to delete the selected error message before I set the new insertion point and indeed sometimes I find I don't want to delete the error message text until after I've fixed the error. I have just recently discovered I can use Ctrl-" to make the error into a comment though....
What I can't figure out is: when is the "natural" time to make the balloons disappear?
Why not when they're clicked on, or at the latest when the pane is accepted again? They could even be dragged out of the way too (can a morph be sub-morph without being in the same screen area as its parent morph?). Perhaps they could also expand and incorporate the original text for reference too once any change is made in their context.
Here's one late-night solution to in lined error message irritations. It basically does what most coding environments do, error messages appear at the bottom of the window and the cursor is moved to the offending spot. This is a quick hack but the error box could be turned into some kind of listMorph supporting multiple error messages, code warnings, optimization hints, encouragements, recipes, squeak foundation banner advertising... I digress. At the very least it'll save you one keystroke. Jpeg attached.
-Wiebe
-----Oorspronkelijk bericht----- Van: Andrew P. Black [mailto:apb@cse.ogi.edu] Verzonden: 13 May 2001 20:08 Aan: squeak@cs.uiuc.edu Onderwerp: RE: Squeak textbox and events.
We have the tools to do something that might feel more natural, at least to someone unused to the Smalltalk Paragraph Editor. That is: we have balloons, as used in balloon help. It seems to me a balloons would be a natural place to put an error message. What I can't figure out is: when is the "natural" time to make the balloons disappear? Probably not when you first put the cursor at the offending place, because you may not have fully read the contents yet. But while you are editing, the balloon would be in the way. It seems that in lined error messages that I can read or delete at will have advantages.
squeak-dev@lists.squeakfoundation.org