[FIX][hack]Number>>readFromString can't deal with Fraction printString(was: Re: Remote Squeaking)

Torge Husfeldt jean-jacques.gelee at gmx.de
Sun Oct 21 22:31:45 UTC 2001


Ned Konz wrote:
> 
> On Sunday 21 October 2001 12:53 pm, Lex Spoon wrote:
> 
> > The EToy system uses Nebraska.  9091 is only the default, btw.  Heck, it
> > doesn't even *really* need a TCP connection -- any stream will do.
> >
> >
> > Hmm, all this would make a nice Swiki page....
> 
> It would... there's http://minnow.cc.gatech.edu/squeak/1356
> but I don't know how accurate it is.
> 
> I tried it on my own machine:
> 
> * hit the "Share" button on the Project navigator. My Hand gets my name.
> * pulled out a badge for myself from the Objects tool
> * turned on my ears (pulled out a Listener and turned it on)
> 
> hit the "S" on my badge, saw a green rectangle with an orange border appear.
> This rectangle had several white rectangles on it.
> 
> Then I got a walkback:
> 
> VM: unix - Squeak3.1alpha of 7 March 2001 [latest update: #4332]
> Image: Squeak3.2alpha [latest update: #4441]
> 
> Integer class(Object)>>error:
>         Receiver: Integer
>         Arguments and temporary variables:
>                 aString:        'At least one digit expected here'
>         Receiver's instance variables:
>                 <<too complex to show>>
> 
> Integer class>>readFrom:base:
>         Receiver: Integer
>         Arguments and temporary variables:
>                 aStream:        a ReadStream
>                 base:   10
>                 digit:  -8
>                 value:  0
>                 neg:    false
>                 startPos:       0
>         Receiver's instance variables:
>                 <<too complex to show>>
> 
> Number class>>readFrom:
>         Receiver: Number
>         Arguments and temporary variables:
>                 stringOrStream:         a ReadStream
>                 value:  nil
>                 base:   10
>                 aStream:        a ReadStream
>                 sign:   1
>         Receiver's instance variables:
>                 <<too complex to show>>
> 
> Number class(Object)>>readFromString:
>         Receiver: Number
>         Arguments and temporary variables:
>                 aString:        '(257/9)'
>         Receiver's instance variables:
>                 <<too complex to show>>
> 
> --- The rest of the stack ---
> MorphicTransform class>>fromRemoteCanvasEncoding:
> DisplayTransform class>>fromRemoteCanvasEncoding:
> CanvasDecoder class>>decodeTransform:
> CanvasDecoder>>setTransform:
> CanvasDecoder>>processCommand:onForceDo:
> CanvasDecoder>>processIOOnForce:
> NetworkTerminalMorph>>step
This is a quick hack to solve Ned's problem with remote squeaking.
To reproduce the error try:

Number readFromString:(257/9) printString

Cheers,
Torge

> NetworkTerminalMorph(Morph)>>stepAt:
> StepMessage(MorphicAlarm)>>value:
> WorldState>>runLocalStepMethodsIn:
> WorldState>>runStepMethodsIn:
> PasteUpMorph>>runStepMethods
> WorldState>>doOneCycleNowFor:
> WorldState>>doOneCycleFor:
> PasteUpMorph>>doOneCycle
> [] in Project class>>spawnNewProcess
> [] in BlockContext>>newProcess
> 
> The problem is that the received packet was:
> #('B' 'Morphic,-8,-8,(257/9),0.0')
> 
> and we're trying to make an Integer from '(257/9)'.
> 
> So I don't know if there's a problem or not, but it doesn't work on my one
> machine (I know, I should try this remotely).
> 
> --
> Ned Konz
> currently: Stanwood, WA
> email:     ned at bike-nomad.com
> homepage:  http://bike-nomad.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReadFractionsInBrackets-th.2.cs
Type: application/octet-stream
Size: 559 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20011022/c73e45b3/ReadFractionsInBrackets-th.2.obj


More information about the Squeak-dev mailing list