Not at the same time on the same file. #put:into is use in one situation
to write out a sketch as a XML file, and in another situation to write
out a PNG image.

However, It is true DrGeo xml document can embed bitmap, but it is
base64 encoded, so saving with readStream is not a problem.

I am still curious how I will use wrappedStream in  case DrGeo's XML
document contained binary data.


Le 26/07/2019 à 08:03, Sven Van Caekenberghe a écrit :
> You said you wanted to write both character data (XML) as binary data 
> (images) to the same stream, or so I understood.
>
>> On 26 Jul 2019, at 00:22, Hilaire <hila...@drgeo.eu> wrote:
>>
>> I don't understand how #wrappedStream works in my situation?
>>
>> Is #isBinary not good enougth?
>>
>> Le 25/07/2019 à 21:53, Sven Van Caekenberghe a écrit :
>>> If you have a character read or write stream, you can use #wrappedStream to 
>>> access the underlying binary stream, should you need to do that.
>>>
>>>> On 25 Jul 2019, at 20:31, Hilaire <hila...@drgeo.eu> wrote:
>>>>
>>>> Thanks for the tips. It is definitely a left over from porting DrGeo to
>>>> P7 from P4/5/6 (not sure)
>>>>
>>>> But it can't really work as put:into: is used to write both sktech
>>>> content (XML file) and its PNG preview.
>>>>
>>>> At some point in Pharo history both UTF8 and bitmap were using binary
>>>> stream.
>>>>
>>>> Likely a putBinary:into: is needed too.
>>>>
>>>> -- 
>>>> Dr. Geo
>>>> http://drgeo.eu
>>>>
>>>>
>>>>
>> -- 
>> Dr. Geo
>> http://drgeo.eu
>>
>>
>>
>
-- 
Dr. Geo
http://drgeo.eu



Reply via email to