[Cuis-dev] Importing String objects from Squeak (was Re: ReferenceStream class >> dumpOnFile: aFileEntry object: anObject)
Juan Vuletich
juan at cuis.st
Sun Dec 1 06:47:09 PST 2024
Hi Hannes,
I've just pushed your changes to GitHub.
Thanks,
On 11/30/2024 1:52 PM, H. Hirzel via Cuis-dev wrote:
> Hi Juan
>
> I suggest to add a comment on
>
> ReferenceStream class restoreFromFile: aFileEntry
>
> would have wished would be included.
>
> "
> Note about importing String objects from Squeak:
>
> To make sure Strings can be moved from Squeak use
> aString utf8Encoded
> to convert the strings to ByteArrays in Squeak before you export the
> object collection.
>
> In Cuis you need to do then
> UnicodeString fromUtf8Bytes: aByteArray
> to get them back.
>
> It took me quite some time to figure out this simple solution.
>
> For data classes ('dumb data objects', Value hierarchy) I can hide
> this conversion if I store the strings in a properties dictionary and
> have the conversion in a superclass. This allows me to move these
> objects from Squeak to Cuis.
>
> A better solution would be to have SmartRefStream deal with ByteString
> and WideString objects (when importing from Squeak) as both are not in
> Cuis. But at the moment I am fine using the UTF8 conversion approach.
>
> Regards
>
> Hannes
>
>
> On 11/27/2024 1:31 PM, H. Hirzel wrote:
>> Hello
>>
>> Attached is an updated comment of
>>
>> ReferenceStream class >> dumpOnFile: aFileEntry object: anObject
>>
>> --Hannes
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
More information about the Cuis-dev
mailing list