admin:shapechange
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| admin:shapechange [2013/04/01 21:18] – jwarrior | admin:shapechange [2013/05/19 15: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 | ||
| + | </ | ||
| + | |||
| + | |||
