[Cuis-dev] TrueType font import problems
Gerald Klix
cuis.01 at klix.ch
Thu Sep 14 13:33:58 PDT 2023
On 9/14/23 7:42 PM, Juan Vuletich via Cuis-dev wrote:
> Hi Gerald,
>
> On 9/14/2023 10:16 AM, Gerald Klix via Cuis-dev wrote:
>> Hi Guys,
>>
>> this removal of TextFontFamilyAndSize breaks loading persistent Text
>> objects
>> that use its instances as a text attribute. I encountered this kind
>> of problem
>> with my ToDo-application that stores texts in my PlanF database,
>> but I presume it will also happen when one
>> uses a ReferenceStream for persistence.
>>
>> As a stopgap measure I exported TextFontFamilyAndSize from
>> an old image and added it directly t by database package.
>> I seems to work (but it is ugly).
>>
>> In a nutshell:
>> Some kind of objects, like strings, byte arrays, texts and their
>> associated classes, are likely to be persistent in some way.
>> These classes should not be removed
>> without providing a backward-compatibility package.
>>
>> In other words:
>> There is not much sense in providing
>> means for persistence, like ReferenceStream, in the base
>> image and than break this very persistence by removing classes.
>> (Sorry for my harsh words).
>>
>>
>> Just my 0.01€,
>>
>> Gerald
>
> I think your words are entirely reasonable, but I also think that such
> level of compatibility may be required by users of applications. Cuis
> is not an end user application, but a platform for pro level
> developers. I do my best to minimize breakage while moving Cuis
> forward, but some hiccups are possible.
>
> You already found a perfectly reasonable solution to your use of PlanF
> database and ReferenceStream with these text attributes. Good on you.
>
> Cheers,
>
Thank you,
Currently this application is used by me and no one else,
therefore I kept quite until others had issues.
If someone uses Cuis for production code, than
there should be at least some way to notify developers
of trouble ahead. Maybe just send a message to the mailing list.
OTH, this would not have helped in my case; I was not even
aware that I was using this class.
Without some administrative procedures, this situation,
will occur again. I am perfectly aware that your time is limited
and you don't want to waste it on red tape.
BTW:
IHMO it makes sense to persist the package name
of classes (if the class is contained in package) in
reference streams. Loading the package if required.
I found this feature very convenient when I used Python's
pickle module and implemented it for PlanF's predecessor
PlanE and of course for PlanF itself.
PlanF stores package-name, version and file path
of the package. It tries hard to use the exact same code,
that was present when the data was persisted.
Best Regards,
Gerald
More information about the Cuis-dev
mailing list