> On 1 Aug 2018, at 00:34, Andrew P. Black <[email protected]> wrote:
>
> I’m making a stream to write on a file using
>
> outputFile := FileLocator home / 'Desktop' / classBeingTranslated name
> , '.grace'.
> outputFile writeStreamDo: [ :s | ... ]
>
> Is that OK?
Yes
> When I do the above, in the writeStreamDo: block, s is bound to an instance
> of ZnCharacterWriteStream. But that class does nt understand many methods
> from WriteStream. For example, #contents is not understood, and nor is
> #ensureASpace.
>
> To put things another way: I wrote tests using a stream created with String
> streamContents: [ :s | ... ], and everything worked fine. Then, for
> production use, I switch to a stream created using outputFile writeStreamDo:
> [ :s | ... ] and everything breaks.
>
> I know that ZnCharacterWriteStream is fairly new. Am I doing something
> wrong, or is ZnCharacterWriteStream still under development?
>
> Andrew
The new streams are intentionally simpler, with a lighter API. If they were
exactly the same, API wise, there would not be much point in doing them.