[BUG] [FIX] duplicate "-- all --" category
Scott Wallace
scott.wallace at squeakland.org
Fri Jul 26 07:41:20 UTC 2002
Boris,
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 "-- all --" (such methods might be present because of
the Versions Browser bug you have now fixed.)
However, your proposed change to
fileOutCategory:on:toFile:moveSource: breaks several other of its
senders, because several of them actually expect and require that "--
all --" be specially handled to produce all the selectors implemented
by the class, and *not* be thought of as an actual, concrete category.
So instead, an expedient solution is to eliminate the possibility of
there being any methods assigned to the "-- all --" category before
compressing sources. Update 4927 now does that. 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.
Cheers,
-- Scott
At 10:21 PM +0200 7/25/02, Boris Gaertner wrote:
>Scott also mentioned that he successfully compressed the changes
>of an image with methods in category "-- all --". This is an
>interesting point.
>Compression of changes retrieves the methods of a category
>with method ClassOrganizer>>listAtCategoryNamed:
>
>fileOutChangedMessages: aSet on: aFileStream
> moveSource: moveSource toFile: fileIndex
> | org sels |
> (org _ self organization) categories do:
> [:cat |
> sels _ (org listAtCategoryNamed: cat) select: [:sel | aSet includes: sel].
> sels do:
> [:sel | self printMethodChunk: sel withPreamble: true on: aFileStream
> moveSource: moveSource toFile: fileIndex]]
>
>This works for every category (including one with name "-- all --")
>because every method can be found in exactly one category.
>
>Compression of the source file ultimately calls this method:
>
>fileOutCategory: aSymbol on: aFileStream
> moveSource: moveSource toFile: fileIndex
> | selectors |
>
> aFileStream cr.
> selectors := (aSymbol asString = ClassOrganizer allCategory)
> ifTrue: [ self organization allMethodSelectors ]
> ifFalse: [ self organization listAtCategoryNamed: aSymbol ].
>
> "Overridden to preserve author stamps in sources file regardless"
> selectors do: [:sel |
> self printMethodChunk: sel
> withPreamble: true
> on: aFileStream
> moveSource: moveSource
> toFile: fileIndex].
> ^ self
>
>The passage printed in boldface implements special treatment of the
>category name '-- all --' and that special treatment caused my problem.
>The statement
>selectors := self organization listAtCategoryNamed: aSymbol.
>would handle category "-- all --" like any other category.
>
>Should we change the passage printed in boldface? What would be
>the side effacts?
>
>
>Greetings
>Boris
>
>This is a very long message. Sorry for that.
>
>
>
>
>
>
>
>Content-Type: application/octet-stream;
> name="VersionBrowser.2.cs"
>Content-Disposition: attachment;
> filename="VersionBrowser.2.cs"
>
>Attachment converted: Mfalme:VersionBrowser.2.cs (????/----) (00082B54)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020726/8253d947/attachment.htm
More information about the Squeak-dev
mailing list
|