On 21 February 2018 at 11:43, Alistair Grant <[email protected]> wrote:
> Hi Everyone,
>
> Attempting to file out changes from the Change Sorter results in an
> 'Improper store into indexable object'.  (To reproduce this, right click
> on any change set and choose "File out").
>
> I believe the root cause of the problem is:
>
> CodeExporter class>>writeSourceCodeFrom: aStream toFileReference: 
> aFileReference
>
> aFileReference writeStreamDo: [ :outputStream |
> (ZnCrPortableWriteStream on: (ZnCharacterWriteStream
> on: outputStream
> encoding: 'utf8')) nextPutAll: aStream contents.
> ].
>
> self inform: 'Filed out to: ', String cr, aFileReference basename
>
>
> ZnCrPortableWriteStream expects a binary stream and is being given a
> multi-byte file stream.
>
> The obvious solution is to add FileReference>>binaryWriteStreamDo: and
> associated methods.
>
> Can someone who is more familiar with the Zinc package confirm that my
> understanding is correct?
>
> Fogbugz: 
> https://pharo.fogbugz.com/f/cases/21381/CodeExporter-triggers-errorImproperStore

And if I'd bothered to read the class comments before posting, I
wouldn't have wasted everyone's time.

Using a binary write stream is the answer, according to the class comments.


Sorry,
Alistair

Reply via email to