[squeak-dev] odd bug in Squeak 4.3, also in Pharo 1.3?...

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Fri Mar 2 22:52:47 UTC 2012


Ah sorry, I missed one part of your report (and no, I did not have an
image handy).

My answer was more for Pharo since you cannot concatenate
    'foo' , Object new
You need to use explicitely asString or printString or storeString or...
    'foo' , Object new asString

Then, the #Comment failure sounds wrong indeed.
That's just because allMethodsWithSourceString: also scan class comments...
And this is hackish because:
- the class comment is not a method, so allMethodsWithSourceString: is
quite a surprising behavior-name mismatch
- the least we should do would be to return a ClassCommentReference
rather than a MethodReference if we want to maintain this feature.

Nicolas


Le 2 mars 2012 21:57, Lawson English <lenglish5 at cox.net> a écrit :
> On 3/2/12 5:55 AM, Nicolas Cellier wrote:
>>
>> Transcript print: ... ; cr; endEntry
>
> myNav := SystemNavigation default.
> (myNav allMethodsWithSourceString: '"' matchCase: false) do:
>    [:each| Transcript show: each asString -> ( each  actualClass
> commentsIn: each sourceString);cr;endEntry ]
>
> Still generates the error MNU: ComentReference>>sourceString
>
> On Pharo 1.3
>
> Still generates the error: MNU: Key not found: Comment
>
> On Squeak 4.3
>
>
>
> AFTER many hundreds of lines of valid output.
>
> In the same place as before in both images with 2 different VMs.
>
>
>
> Are you testing the code you are writing and not seeing the error?
>
> L
>


More information about the Squeak-dev mailing list