[ENH] FileOutUIRemove ( [sm][cd] )

Brent Vukmer bvukmer at blackboard.com
Mon Apr 7 14:30:21 UTC 2003

Re-posted with an [ENH] tag so that the Bug Fixes Archive ( http://swiki.gsug.org/sqfixes ) will pick it up...

-----Original Message-----
From: Tim Rowledge [mailto:tim at sumeru.stanford.edu]
Sent: Saturday, April 05, 2003 9:47 PM
To: squeak-dev at lists.squeakfoundation.org
Subject: Re: [BUG]Class fileouts and changeset fileouts do not do the

In message <014595dd4b.rowledge at goldskin.attbi.com>
          Tim Rowledge <tim at sumeru.stanford.edu> wrote:

> {side problem - it asks the user if it should do that at fileout time
> via a dialogue. this is marginally acceptable when the fileout is done
> from the UI browser, totally unnacceptable when done via a doit}
Here is a changeset that offers a possible way around this. I know
Stephane et al. are working in this area anyway so I hope it might prove
useful to them in some way.

 "Change Set:		FileOutUIRemove
Date:			5 April 2003
Author:			tim at sumeru.stanford.edu

When we file out a class a nofitier asks if we want to include the pool
dictionaries and then further notifiers ask for each pool. This is ok
when there is a UI but a potential catastrophe in a shrunk system with
no Display. Perhaps worse, it is simply poor engineering.

This changeset illustrates an approach to avoiding this problem with the
use of an Exception that has a defaultAction of simply returning true.
UI tools (such as the Browser) can handle the exception an use a
notifier instead.

The new Exception class has a deliberately dumb name because I couldn't
think of a good one. I suggest that a matching default-to-false class
would be useful and a better mechanism to pass information up to the
handler (or another approach entirely) would be nice.

There are interesting problems in using Exceptions in this way. Writers
of code have to know that an exception may be raised and how to handle
it. This can mean reading a whole bunch of code in order to find out how
and when the raising occurs."

Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Useful random insult:- Has his brain on cruise control again.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FileOutUIRemove.1.cs.gz
Type: application/riscos
Size: 2184 bytes
Desc: FileOutUIRemove.1.cs.gz
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030407/99833ca3/FileOutUIRemove.1.cs.bin
-------------- next part --------------

More information about the Squeak-dev mailing list