<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>Re: [BUG] [FIX] duplicate &quot;-- all --&quot;
category</title></head><body>
<div>Boris,</div>
<div><br></div>
<div>As to the condenseSources issue in your memo, your suggested
change would indeed work around the bug you have been encountering
when condensing sources in an image that has any methods spuriously
categorized in &quot;-- all --&quot; (such methods might be present
because of the Versions Browser bug you have now fixed.)</div>
<div><br></div>
<div>However, your proposed change to
fileOutCategory:on:toFile:moveSource: breaks several other of its
senders, because several of them actually expect and require that
&quot;-- all --&quot; be specially handled to produce all the
selectors implemented by the class, and *not* be thought of as an
actual, concrete category.</div>
<div><br></div>
<div>So instead, an expedient solution is to eliminate the possibility
of there being any methods assigned to the &quot;-- all --&quot;
category before compressing sources.&nbsp; Update 4927 now does that.&nbsp;
For older systems, I again suggest that you apply the fixup method I
sent out the other day,
http://groups.yahoo.com/group/squeak/message/47318, before condensing
sources.</div>
<div><br></div>
<div>Cheers,</div>
<div><br></div>
<div>&nbsp; -- Scott</div>
<div><br></div>
<div>At 10:21 PM +0200 7/25/02, Boris Gaertner wrote:</div>
<blockquote type="cite" cite><font face="Arial" size="-1">Scott also
mentioned that he successfully compressed the
changes</font></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">of an image
with&nbsp; methods in category&nbsp;&quot;-- all --&quot;. This is
an</font></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">interesting
point.</font></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">Compression
of changes retrieves the methods of a category</font></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">with method
ClassOrganizer&gt;&gt;listAtCategoryNamed:</font></blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite><font face="Arial"
size="-1">fileOutChangedMessages: aSet on:
aFileStream</font></blockquote>
<blockquote type="cite" cite><font face="Arial"
size="-1">&nbsp;&nbsp;&nbsp;&nbsp; moveSource: moveSource toFile:
fileIndex&nbsp;<br>
&nbsp;| org sels |<br>
&nbsp;(org _ self organization) categories do:<br>
&nbsp;&nbsp;[:cat |<br>
&nbsp;&nbsp;sels _ (org<b> listAtCategoryNamed:</b> cat) select: [:sel
| aSet includes: sel].<br>
&nbsp;&nbsp;sels do:<br>
&nbsp;&nbsp;&nbsp;[:sel |&nbsp; self printMethodChunk: sel
withPreamble: true on: aFileStream<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;moveSource: moveSource
toFile: fileIndex]]</font></blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">This works
for every category (including one with name &quot;-- all
--&quot;)</font></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">because
every method can be found in exactly one category.</font></blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">Compression
of the source file ultimately calls this method:</font></blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite><font face="Arial"
size="-1">fileOutCategory: aSymbol on: aFileStream</font></blockquote>
<blockquote type="cite" cite><font face="Arial"
size="-1">&nbsp;&nbsp;&nbsp;&nbsp; moveSource: moveSource toFile:
fileIndex&nbsp;</font></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">&nbsp;|
selectors |</font></blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite><font face="Arial"
size="-1">&nbsp;aFileStream cr.<br>
&nbsp;<b>selectors := (aSymbol asString = ClassOrganizer
allCategory)<br>
&nbsp;&nbsp;&nbsp;&nbsp;ifTrue: [ self organization allMethodSelectors
]<br>
&nbsp;&nbsp;&nbsp;&nbsp;</b>ifFalse: [ self organization
listAtCategoryNamed: aSymbol ].</font></blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite><font face="Arial"
size="-1">&nbsp;&quot;Overridden to preserve author stamps in sources
file regardless&quot;<br>
&nbsp;selectors do: [:sel |<br>
&nbsp;&nbsp;self printMethodChunk: sel<br>
&nbsp;&nbsp;&nbsp;withPreamble: true<br>
&nbsp;&nbsp;&nbsp;on: aFileStream<br>
&nbsp;&nbsp;&nbsp;moveSource: moveSource<br>
&nbsp;&nbsp;&nbsp;toFile: fileIndex].<br>
&nbsp;^ self</font></blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">The passage
printed in boldface implements special treatment of
the</font></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">category
name '-- all --' and that special treatment caused my
problem.</font></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">The
statement</font></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">selectors :=
self organization listAtCategoryNamed: aSymbol.</font></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">would handle
category &quot;-- all --&quot; like any other
category.</font></blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">Should we
change the passage printed in boldface? What would
be</font></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">the side
effacts?</font></blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite><font face="Arial"
size="-1">Greetings</font></blockquote>
<blockquote type="cite" cite><font face="Arial"
size="-1">Boris</font></blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">This is a
very long message. Sorry for that.</font></blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite>&nbsp;</blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite><font face="Arial"
size="-1">&nbsp;</font></blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite>Content-Type:
application/octet-stream;</blockquote>
<blockquote type="cite"
cite><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>name=&quot;VersionBrowser.2.cs&quot;</blockquote>
<blockquote type="cite" cite>Content-Disposition:
attachment;</blockquote>
<blockquote type="cite"
cite><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>filename=&quot;VersionBrowser.2.cs&quot;</blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite>Attachment converted:
Mfalme:VersionBrowser.2.cs (????/----) (00082B54)</blockquote>
<div><br></div>
</body>
</html>