admin:shapechange
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
admin:shapechange [2012/05/14 11:52] – created jwarrior | admin:shapechange [2013/05/19 11:58] (current) – jwarrior | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Shape Change ====== | ||
+ | 2013/05/12. This works. See also TestDuration class>> | ||
+ | |||
+ | The mutate:* method goes on the __Class__ side! | ||
+ | |||
+ | < | ||
+ | | stream byteArray dt | | ||
+ | |||
+ | dt := DateAndTime year: 1989 day: 240 hour: 05 minute: 04 second: 03. | ||
+ | stream := ReadWriteStream on: ByteArray new. | ||
+ | ObjectDumper new unload: dt intoStream: stream. | ||
+ | byteArray := stream contents. | ||
+ | |||
+ | stream := WriteStream on: (String new: 2000). | ||
+ | stream nextPutAll: '# | ||
+ | byteArray doWithIndex: | ||
+ | i \\ 30 = 0 ifTrue: [stream cr]. | ||
+ | byte printOn: stream. | ||
+ | i = byteArray size ifFalse: [stream space]]. | ||
+ | stream nextPut: $). | ||
+ | |||
+ | stream contents | ||
+ | </ | ||
+ | |||
+ |