[Glass] createStone test 3.6.0 failed

Dale Henrichs dale.henrichs at gemtalksystems.com
Mon Nov 30 10:02:46 PST 2020


could you send me the implementation of 
SmallScaledDecimal(ScaledDecimal)>>_printAsDateAndTimeANSISecondsOn: in 
your image?

Use the following topaz command in a topaz session, logged in as 
DataCurator:

    lookup ScaledDecimal>>_printAsDateAndTimeANSISecondsOn:

 From the error you are getting it seems that you must be touching an 
instance variable in ScaledDecimal in the method that causes the message 
to fail with the "unexpected format" message..

For the record here is the old implementation (from 3.5.4):

    topaz 1> lookup ScaledDecimal>>_printAsDateAndTimeANSISecondsOn:
         category: '*squeak'
    method: ScaledDecimal
    _printAsDateAndTimeANSISecondsOn: aStream

             | string i |
             "Adding 100 causes a very tiny loss of precission but makes parsing much easier"
             string := (self + 100) asString.
             (string at: 4) = $. ifFalse: [self error: 'unexpected format'].
             i := string size.
             [
                     (string at: i) = $0 or: [ (string at: i) = $. ].
             ] whileTrue: [
                     i := i - 1.
             ].
             aStream nextPutAll: (string copyFrom: 2 to: i).
    %

and the new implementation (for 3.6.0):

    topaz 1> lookup ScaledDecimal>>_printAsDateAndTimeANSISecondsOn:
         category: '*squeak'
    method: ScaledDecimal
    _printAsDateAndTimeANSISecondsOn: aStream
       | string i noDecimalPoint |
       "Adding 100 causes a very tiny loss of precission but makes parsing much easier"
       self = 0
         ifTrue: [ aStream nextPutAll: '00' ]
         ifFalse: [
           string := (self + 100) asString.
           (string at: 4) = $.
             ifFalse: [ self error: 'unexpected format' ].
           i := string size.
           noDecimalPoint := true.
           [
           | char |
           "strip trailing 0's"
           char := string at: i.
           noDecimalPoint
             ifTrue: [ noDecimalPoint := char ~= $. ].
           noDecimalPoint and: [ char = $0 ] ]
             whileTrue: [ i := i - 1 ].
           noDecimalPoint
             ifFalse: [
               "don't include the decimal point in the printString, if $. is last character"
               i := i - 1 ].
           aStream nextPutAll: (string copyFrom: 2 to: i) ]
    %

I pretty much compared all of the code loaded into the image, and other 
than an older version of AST-Core (AST-Core-dkh.105 instead of 
AST-Core-dkh.106) ... so the RB git repo is apparently not on the latest 
version ...

The code in question is in Squeak.v36-dkh.351 and you have loaded that 
version as well ...

Dale

On 11/27/20 12:06 AM, Marten Feldtmann via Glass wrote:
> Hey,
>
> actually something must be strange on my system. The original error is 
> still there, but I was able to create a stone using "createStone -g 
> test 3.6.0", but I can't do anything with it.
>
> I tried Jade 2.4.6 with this running stone, but Jade complains (while 
> connecting and starting) a compile error ...
>
> _keysForDictionary: aDictionary
>
> and as I understand it complains an undefined symbol (which seems to 
> be the parameter aDictionary):
>
> | keys |
>
>
> (aDictionary isKindOf: RubyHash) ifFalse:[ ^super _keysForDictionary: aDictionary ]
>
>
>                                                                        ^1
>
>
>
> I know it does not make much sense ...
>
>
>
> Marten
>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> https://lists.gemtalksystems.com/mailman/listinfo/glass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gemtalksystems.com/mailman/private/glass/attachments/20201130/2f0fa409/attachment-0001.htm>


More information about the Glass mailing list