Using TxxxPropStorage for common component serialization lazarus / 31-LCL ---------------------------------------------------------------------- simsee · 2023-11-22 11:22 I am approaching the topic of serialization of objects and I have read interesting articles and posts, including: https://wiki.freepascal.org/Streaming_components https://www.codeproject.com/articles/1060345/dfm-serialization-in- depth My question is the following. Using TINIPropStorage/TXMLPropStorage/TJSONPropStorage, is it possible to serialize components other than forms or controls that are inside them? I ask because I made the following attempt: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program project1;uses  Classes, IniPropStorage, LResources, SysUtils; type   { TMyComponent }   TMyComponent = class(TComponent)  private    FID: integer;  published    property ID: integer read FID write FID;  end; var  MyComponent : TMyComponent;  AIniPropStorage : TIniPropStorage; { TMyComponent } begin  MyComponent:=TMyComponent.Create(nil);  AIniPropStorage:=TIniPropStorage.Create(MyComponent);  AIniPropStorage.WriteString('ID',IntToStr(MyComponent.ID));  MyComponent.ID:=27;  AIniPropStorage.Free;  MyComponent.Free;end. encountering a series of compilation errors: Compile Project, Target: project1.exe: Exit code 1, Errors: 16 project1.lpr(30,1) Error: Undefined symbol: WSRegisterCustomImageListResolution project1.lpr(30,1) Error: Undefined symbol: WSRegisterMenuItem project1.lpr(30,1) Error: Undefined symbol: WSRegisterMenu project1.lpr(30,1) Error: Undefined symbol: WSRegisterMainMenu project1.lpr(30,1) Error: Undefined symbol: WSRegisterPopupMenu project1.lpr(30,1) Error: Undefined symbol: WSRegisterDragImageListResolution project1.lpr(30,1) Error: Undefined symbol: WSRegisterLazAccessibleObject project1.lpr(30,1) Error: Undefined symbol: WSRegisterControl project1.lpr(30,1) Error: Undefined symbol: WSRegisterWinControl project1.lpr(30,1) Error: Undefined symbol: WSRegisterGraphicControl project1.lpr(30,1) Error: Undefined symbol: WSRegisterCustomControl project1.lpr(30,1) Error: Undefined symbol: WSRegisterScrollingWinControl project1.lpr(30,1) Error: Undefined symbol: WSRegisterScrollBox project1.lpr(30,1) Error: Undefined symbol: WSRegisterCustomFrame project1.lpr(30,1) Error: Undefined symbol: WSRegisterCustomForm project1.lpr(30,1) Error: Undefined symbol: WSRegisterHintWindow The problem is related to component registration. But is it possible to use TxxxPropStorage for this purpose? ---------------------------------------------------------------------- paweld · 2023-11-22 11:57 You can. Need to add the LCL package to the project requirements and add the Interfaces unit to the uses. ---------------------------------------------------------------------- simsee · 2023-11-22 12:06 Thank you. I forgot to add the Interfaces unit. In the meantime I have successfully used TStream.WriteComponent. The only inconvenience is that the format of the generated file is binary, not textual as I would like (ini/xml/json). I don't know if it is possible to overcome this problem with TStream.