Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Remove fileoutasHTML from Class
Last updated at 1:13 am UTC on 17 January 2006
From: Ned Konz
Date: Sat May 31, 2003 4:32:28 PM Europe/Zurich
To: The general-purpose Squeak developers list
Subject: Re: [BUG][FIX] DeclarativePools
Reply-To: The general-purpose Squeak developers list

Stephane Ducasse wrote:

>I really have a problem with the idea of having Class>>fileOutAsHtml:
>I think that the fileOut should be rethink: may be we should have a fileOuter, >HTMLFileOuter...

I like the way that Dandelion does it, using separate introspectors. These then use different strategies (reflection, reading annotated comments, etc.) to answer queries from the outputters. It seems clear to me that structured introspection should be separate from the things being examined, and that the output should be separate from those. Separating reflection from Behavior as well (as has been suggested here before) might also make sense.

>This code is also really ugly, I had really hard time to create a new fileOuter that >was compatible with
>VW and there is all kinds of bad dirty logic full of if HTML.
>Finally I was really wondering was a class such as SmartRefStream has reference to >PopUpMenu......
>but this another discussion.

It clearly shouldn't have. An Exception of some sort would probably be best here. The World's default handler for this exception could be to pop up the dialog.

Likewise, entities like ChangeSet really shouldn't be doing UI work themselves.

>If somebody has ideas to propose a cleaner solution please talk.
>As a first step could we agree to get rid of the fileout as html feature?

I could see removing it from Class and putting it somewhere else, then sticking it into a package.