odd bug in Squeak 4.3, also in Pharo 1.3?...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

odd bug in Squeak 4.3, also in Pharo 1.3?...

LawsonEnglish
I was creating a new video tutorial to show how to find all comments in
all classes but I'm getting errors in both Squeak 4.3 and Pharo 1.3.

In Squeak 4.3, the  error is: Key not found: Comment

In Pharo 1.3, the error is: Improper store into indexable object.


the code is:

myNav := SystemNavigation default.

(myNav allMethodsWithSourceString: '"' matchCase: false) do:
      [:each| Transcript show: each asString, ' => ', ( each  
actualClass commentsIn: each sourceString);cr ]


In Pharo, the error shows up after the Transcript output:

UndefinedObject>>DoIt (myNav is Undeclared)

In Squeak the error shows up each time after the Transcript output:

[...]
AbstractSound class updateScorePlayers => an OrderedCollection('Force
all ScorePlayers to update their instrument list from the sound library.
This may done after loading, unloading, or replacing a sound to make all
ScorePlayers feel the change.')

UndefinedObject>>DoIt (myNav is Undeclared)
UndefinedObject>>DoIt (myNav is Undeclared)





Help? Error shows up in Squeak 4.3 image running both in the all-in-one
distribution, and running on Cog VM.

In Pharo 1.3 using Cog VM.

Mac OS X 10.6.8.

Thanks,

  Lawson






Reply | Threaded
Open this post in threaded view
|

Re: odd bug in Squeak 4.3, also in Pharo 1.3?...

Marcus Denker-4

On Mar 2, 2012, at 4:25 AM, Lawson English wrote:

> I was creating a new video tutorial to show how to find all comments in all classes but I'm getting errors in both Squeak 4.3 and Pharo 1.3.
>
> In Squeak 4.3, the  error is: Key not found: Comment
>
> In Pharo 1.3, the error is: Improper store into indexable object.

commentsIn: returns a collection, not a string.

        Marcus


--
Marcus Denker -- http://marcusdenker.de


Reply | Threaded
Open this post in threaded view
|

Re: odd bug in Squeak 4.3, also in Pharo 1.3?...

LawsonEnglish
On 3/2/12 12:47 AM, Marcus Denker wrote:

> On Mar 2, 2012, at 4:25 AM, Lawson English wrote:
>
>> I was creating a new video tutorial to show how to find all comments in all classes but I'm getting errors in both Squeak 4.3 and Pharo 1.3.
>>
>> In Squeak 4.3, the  error is: Key not found: Comment
>>
>> In Pharo 1.3, the error is: Improper store into indexable object.
> commentsIn: returns a collection, not a string.
>
> Marcus
>
>


Yes but this works in both Squeak 4.3 and Pharo 1.3:

myNav := SystemNavigation default.
a:= (myNav allMethodsWithSourceString: '"' matchCase: false) first.
Transcript show: (a  actualClass commentsIn: a sourceString);cr.


The error happens when  the code iterates to AbstractSound class>>Comment

at least in Squeak. Not sure when the error happens in Pharo. The
behavior of the output is different.


L.