[squeak-dev] Re: Syntax error in MC package (_ problem?)

Ross Boylan ross at biostat.ucsf.edu
Sun Sep 20 03:17:20 UTC 2009


OK, good news and bad.

The good news is that SoundsLike-RobRothwell.1 corrects the syntax error
and loads successfully.

The bad news is that the prior load seemed simply to have frozen.  I
closed the windows that were up, but I ended up with the package partly
installed.  I thought MC loads were atomic.  Can anyone clarify?

I'm a bit puzzled that version 1 of SoundsLike is later than v 2.  The
version history appears to indicate no ancestors for v2, even though the
comment clearly indicates it's a fix.

I am also puzzled that DoubleMetaphoneStringComparator has all its
methods in a protocol called 'Kernel-Objects'.

Although my immediate problem is solved, I'm still curious about all the
issues I've raised, and would welcome any info.

Thanks.
Ross
On Sat, 2009-09-19 at 20:00 -0700, Ross Boylan wrote:
> I tried to load SoundsLike-RJT.2 from 
> MCHttpRepository
>     location: 'http://www.squeaksource.com/SoundsLike'
>     user: ''
>     password: ''
> 
> and got a syntax error in the imported code.  There doesn't appear to be
> any way to proceed.
> 
> The error show in the method pane like this:
> testProcessCxNothing more expected ->_1
> 	dmsc inputKey: 'abcdefg'.
> 	self should: [ dmsc inputKey = 'ABCDEFG' ].
> 
> I think the problem is that the method is called
> testProcessCx_1
> and the underscore is getting interpreted as assignment.
> 
> This raises a couple of issues.  I'm in a squeak3.10 image.
> 
> First, can I do something so that _ will be accepted as a regular
> character, at least for the import and perhaps beyond?  I ran into this
> earlier; I wanted to use _ as a way of indicating  a method was private
> (e.g., _foo is for consumption of the class only), and that didn't work.
> 
> Second, what is the preferred way to indicate assignment, _ or := ?
> In the past, I remember _ was automatically converted to := if you typed
> it, but this is not happening any more.
> 
> Third, given something in squeaksource that needs a fix up, how does one
> do that?  This is not a question about how to edit the code once I have
> a hold of it; it is a question about everything that surrounds that.  I
> noticed when I tried to browse the package that things looked odd; I
> suspect this also resulted from the parse failure.  It looks as if I do
> have the mcz file in my package-cache, but I'm not sure how to make a
> new one.  I also am not sure if uploading the fixed version to
> squeaksource is advisable, or even possible.
> 
> Thanks.
> Ross Boylan
> 




More information about the Squeak-dev mailing list