[squeak-dev] [M7634] Cannot revert a class comment

Levente Uzonyi leves at elte.hu
Fri May 6 15:10:14 UTC 2011


On Fri, 6 May 2011, Frank Shearar wrote:

> http://bugs.squeak.org/view.php?id=7634 says
>
> Find a class with a class comment. Edit the comment. Click "versions". Revert 
> to an earlier version.
>
> "NonBooleanReceiver: proceed for truth." because instvar meta in 
> ChangeRecord>>methodClass has as its value the class you're currently 
> editing, rather than a boolean!
>
> Now ClassCommentVersionBrowser>>#scanVersionsOf: says this:
>
>  self addItem:
>    (ChangeRecord new file: file position: position type: #classComment
>      class: class name category: nil meta: class stamp: stamp)
>
> I can see two possible solutions: pass "class" or "class class" into the 
> meta: parameter, or change ChangeRecord>>#methodClass to say

The meta variable should be a boolean, so false should be passed. This is 
a bug since 2003 or earlier.

>
>  meta ifTrue: [ ^ methodClass class ].
>  ^ methodClass.

The above code doesn't work if meta is not a boolean.


Levente

>
> I prefer the latter: ClassCommentVersionBrowser>>#scanVersionsOf: has been 
> around for years, and changing ChangeRecord makes things more robust in the 
> face of anything else being a non-Boolean.
>
> The downside is that meta almost always contains a Boolean... except when 
> (like now) it doesn't.
>
> Thoughts?
>
> frank
>
>



More information about the Squeak-dev mailing list