dialogues in non-gui code

Tim Rowledge rowledge at interval.com
Sat Dec 11 05:20:26 UTC 1999


On Fri 10 Dec, Lex Spoon wrote:
> "Josh Flowers" <josh at i33.com> wrote:
> > 
> > As an aside, what's the general feeling about having a method in a non GUI class tha
> t pops up a
> > menu/dialog (in this case the StandardFileStream|readOnlyFileNamed)?  It seems a bit
>  odd to me,
> > but it was already there, so it seemed the best place for the fix.
> It's ubiquitous in Squeak (and perhaps all Smalltalks).  That said, I
>am
> extremely mixed here.
[snip more sensible stuff]
I can't speak for _all_ Smalltalks, but I doubt you'd find any such
cases in VisualWorks. This is one of the places where raising exceptions
makes particularly good sense; if an application has asked for a file
that has a problem, it should catch the exception and Do The Right
Thing, which might well be to open a notifier to ask the user for help.
Or it might be to log the problem and wait for orders over a remote
control socket. The key benefit is the separation of problem from
solution-finding.

In general, any UI stuff should be separated from anything even remotely
like a low-level framework area. How else can we look forward to real
modularity and headless systems?

tim

-- 
Strange OpCodes: TIO: Take It Over
Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
 tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>





More information about the Squeak-dev mailing list