[squeak-dev] The Inbox: Collections-dtl.556.mcz
Frank Shearar
frank.shearar at gmail.com
Thu Jan 2 21:54:59 UTC 2014
On 2 January 2014 20:54, <commits at source.squeak.org> wrote:
> David T. Lewis uploaded a new version of Collections to project The Inbox:
> http://source.squeak.org/inbox/Collections-dtl.556.mcz
>
> ==================== Summary ====================
>
> Name: Collections-dtl.556
> Author: dtl
> Time: 2 January 2014, 3:54:39.379 pm
> UUID: c115b70b-d18c-4f60-b218-2f48af79d653
> Ancestors: Collections-fbs.555
>
> Simplify RunArray class>>scanFrom: by arranging for TextAttribute to create the appropriate instance. Remove explicit references to TextAttribute subclasses from RunArray.
>
> TextSqkProjectLink is a text attribute that controls project entry and is thus associated with Project.. Move it from Collections-Text to System-Support.
>
> =============== Diff against Collections-fbs.555 ===============
>
> Item was changed:
> + ----- Method: PluggableTextAttribute>>actOnClickFor: (in category 'event handling') -----
> - ----- Method: PluggableTextAttribute>>actOnClickFor: (in category 'clicking') -----
> actOnClickFor: anObject
> evalBlock ifNil: [ ^self ].
> evalBlock numArgs = 0 ifTrue: [ evalBlock value. ^true ].
> evalBlock numArgs = 1 ifTrue: [ evalBlock value: anObject. ^true ].
> self error: 'evalBlock should have 0 or 1 arguments'!
>
> 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
> + 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)]
> + ]
Ah yes, that's a much better idea. I mean, it is a registry of sorts,
but I must have been blind not to see this. Nice!
frank
More information about the Squeak-dev
mailing list
|