<br><br><div class="gmail_quote">On Tue, Feb 9, 2010 at 11:20 AM, Edgar J. De Cleene <span dir="ltr">&lt;<a href="mailto:edgardec2001@yahoo.com.ar">edgardec2001@yahoo.com.ar</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<br>
<br>
On 2/9/10 11:58 AM, &quot;Torsten Bergmann&quot; &lt;<a href="mailto:astares@gmx.de">astares@gmx.de</a>&gt; wrote:<br>
<br>
&gt; Shouldnt we run a script on trunk to remove empty<br>
&gt; categories to clean up a little bit?<br>
<br>
Trying to see if the cleanup I have was in Squeak3.11-8931-alpha.image<br>
originate the attached walkback<br>
<br>
The error was with the .cs via drag and drop and selecting code browser<br>
Using message names tool I see no cleanup in image, so I copy paste here.<br>
Come from original code of Ramon Leon and IMHO should be used before any<br>
image go to ftp<br>
<br>
!SmalltalkImage methodsFor: &#39;image cleanup&#39; stamp: &#39;edc 12/13/2009 08:34&#39;!<br>
cleanup<br>
    &quot;SmalltalkImage current cleanup&quot;<br>
    | tasks |<br>
    Transcript open.<br>
    tasks := OrderedCollection new<br>
                add: [Smalltalk removeEmptyMessageCategories];<br>
<br>
                add: [Workspace<br>
                        allSubInstancesDo: [:each | each setBindings:<br>
Dictionary new]];<br>
<br>
                add: [Undeclared removeUnreferencedKeys];<br>
<br>
                add: [Categorizer sortAllCategories];<br>
<br>
                add: [Symbol compactSymbolTable];<br>
<br>
                add: [#(#TheWorldMenu #FileServices #AppRegistry<br>
#Preferences #FileList )<br>
                        do: [:cl | (Smalltalk at: cl) removeObsolete]];<br>
<br>
                add: [Flaps freshFlapsStart];<br>
<br>
                add: [MCFileBasedRepository flushAllCaches];<br>
<br>
                add: [HandMorph releaseCachedState; initForEvents.<br>
                    self fixObsoleteReferences];<br>
<br>
                add: [Smalltalk forgetDoIts.<br>
                    DataStream initialize.<br>
                    Behavior flushObsoleteSubclasses.<br>
                    &quot;The pointer to currentMethod is not realy needed<br>
                    (anybody care to fix this) and often holds on to<br>
                    obsolete bindings&quot;<br>
                    MethodChangeRecord<br>
                        allInstancesDo: [:each | each noteNewMethod: nil].<br>
                    Smalltalk garbageCollectMost];<br>
                 yourself.<br>
    Utilities<br>
        informUserDuring: [:bar | tasks<br>
                do: [:block |<br>
                    bar value: block printString.<br>
                    [block value]<br>
                        on: Error<br>
                        do: [:error | Transcript show: error;<br>
                                 cr]]].<br>
    SystemNavigation default obsoleteClasses isEmpty<br>
        ifTrue: [SmalltalkImage current saveSession]<br>
        ifFalse: [SystemNavigation default obsoleteClasses<br>
                do: [:each |<br>
                    self halt.<br>
                    [PointerFinder on: each]<br>
                        on: Error<br>
                        do: [:error | Transcript show: error;<br>
                                 cr]]]! !<br>
<font color="#888888"><br>
Edgar</font></blockquote><div><br></div><div>Pedantry:</div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">                   [block value]<br>                       on: Error<br>
                       do: [:error | Transcript show: error;<br>                                cr]]].<br></span></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">is equivalent to</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><span class="Apple-style-span" style="font-size: 13px; ">                   block<br>
                       on: Error<br>                       do: [:error | Transcript show: error;<br>                                cr]]].<br></span></span></font></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<font color="#888888"><span class="Apple-style-span" style="color: rgb(0, 0, 0); "> </span></font></blockquote></div><br>