1
0
Fork 0

msg: Walk the fields in another way, e.g. used when decoding

This commit is contained in:
Holger Hans Peter Freyther 2011-03-15 11:24:49 +01:00
parent b96a8bd5d0
commit 46b6c89e6f
2 changed files with 8 additions and 0 deletions

View File

@ -33,6 +33,10 @@ TestCase subclass: ISUPGeneratedTest [
each create].
struct optionals do: [:each |
each create].
"same thing once more"
struct fieldsDo: [:type :class |
class create].
].
]
]

View File

@ -63,6 +63,10 @@ Object subclass: MSGStructure [
^ fields ifNil: [fields := OrderedCollection new]
]
fieldsDo: aBlock [
^ self fields do: [:each | aBlock value: each first value: each second]
]
filter: aFilter [
| lst |
lst := OrderedCollection new.