[squeak-dev] The Trunk: Collections-dtl.560.mcz

Chris Muller asqueaker at gmail.com
Fri Jan 17 03:05:31 UTC 2014


Thanks Dave, unfortunately I still cannot open this revised "Working
With Squeak".

File this method into trunk updated with this fix and then try to open
Help | Welcome Workspaces | Working with Squeak.

Same works after filing this method into Squeak4.5-13352 from the ftp
site or even 4.4.


On Thu, Jan 16, 2014 at 7:05 PM,  <commits at source.squeak.org> wrote:
> David T. Lewis uploaded a new version of Collections to project The Trunk:
> http://source.squeak.org/trunk/Collections-dtl.560.mcz
>
> ==================== Summary ====================
>
> Name: Collections-dtl.560
> Author: dtl
> Time: 16 January 2014, 8:05:51.73 pm
> UUID: 1ef138a7-e60c-4698-9cc4-c2f641e5607f
> Ancestors: Collections-dtl.559
>
> Relax parsing in RunArray>>scanFrom: to meet expectations of RunArrayTest>>testScanFromTrailer. The example string used in that test does not seem to match the implemention of the fileOut serialization, but the test may be right and the implementation wrong. In any case, relax the parsing here to meet the test expectations, and to be more consistent with the original version of the #scanFrom: method that assumed any unexpected charater to be a separator.
>
> =============== Diff against Collections-dtl.559 ===============
>
> Item was changed:
>   ----- Method: RunArray class>>scanFrom: (in category 'instance creation') -----
>   scanFrom: strm
>         "Read the style section of a fileOut or sources file.  nextChunk has already been done.  We need to return a RunArray of TextAttributes of various kinds.  These are written by the implementors of writeScanOn:"
>         | runs values attrList char |
>         (strm peekFor: $( ) ifFalse: [^ nil].
>         runs := OrderedCollection new.
>         [strm skipSeparators.
>          strm peekFor: $)] whileFalse:
>                 [runs add: (Number readFrom: strm)].
>         values := OrderedCollection new.        "Value array"
>         attrList := OrderedCollection new.      "Attributes list"
>         [(char := strm peek) == nil] whileFalse: [
> +               (char isSeparator or: [ char = $!! ])
> +                       ifTrue: [ "n.b. Skip $!! to meet expectations of RunArrayTest>>testScanFromTrailer.
> +                                       The example string used in that test does not seem to match the implemention
> +                                       of the fileOut serialization, but the test may be right and the implementation
> +                                       wrong. In any case, relax the parsing here to meet the test expectations, and to
> +                                       be more consistent with the original version of this method that assumed any
> +                                       unexpected charater to be a separator. -dtl Jan 2014"
> +                               strm next "space, cr do nothing"]
> -               char isSeparator
> -                       ifTrue: [strm next "space, cr do nothing"]
>                         ifFalse: [char == $,
>                                         ifTrue: [strm next.
>                                                 values add: attrList asArray.
>                                                 attrList := OrderedCollection new]
>                                         ifFalse: [attrList add:  (TextAttribute newFrom: strm)]
>                                 ]
>                 ].
>         values add: attrList asArray.
>         ^ self runs: runs asArray values: (values copyFrom: 1 to: runs size) asArray
>   "
>   RunArray scanFrom: (ReadStream on: '(14 50 312)f1,f1b,f1LInteger +;i')
>   "!
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TheWorldMainDockingBar-workingWithSqueak.st.gz
Type: application/x-gzip
Size: 1713 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140116/f8ba6dc4/TheWorldMainDockingBar-workingWithSqueak.st.bin


More information about the Squeak-dev mailing list