[Lazarus] SessionProperties limited size problem

Paulo Malheiros paulo.malheiros at fe.up.pt
Wed Mar 5 12:50:21 CET 2008

Hello Mattias,

I made a test Application in Linux - SVN 14419
Added 23 TEdit to Form1 and its SessionProperties

   TForm1 = class(TForm)
     Edit1: TEdit;
     Edit10: TEdit;
     Edit11: TEdit;
     Edit12: TEdit;
     Edit13: TEdit;
     Edit14: TEdit;
     Edit15: TEdit;
     Edit16: TEdit;
     Edit17: TEdit;
     Edit18: TEdit;
     Edit19: TEdit;
     Edit2: TEdit;
     Edit20: TEdit;
     Edit21: TEdit;
     Edit22: TEdit;
     Edit23: TEdit;
     Edit3: TEdit;
     Edit4: TEdit;
     Edit5: TEdit;
     Edit6: TEdit;
     Edit7: TEdit;
     Edit8: TEdit;
     Edit9: TEdit;
     IniPropStorage: TIniPropStorage;
     procedure FormCreate(Sender: TObject);
     { private declarations }
     { public declarations }

All were saved correctly. Closing Lazarus and checking "unit1.lfm" I got

   SessionProperties =

After reopening Lazarus and opening SessionProperties Dialog one  
property was missing.
After saving and exiting Lazarus reopened "unit1.lfm" I got

   SessionProperties =

Edit23.Text is missing.

Finally, If I change TStringPropertyEditor.GetEditLimit in  
PropEdits.pp, from 255 to a
bigger value all works fine.

function TStringPropertyEditor.GetEditLimit: Integer;
   if GetPropType^.Kind = tkString then
     Result := GetTypeData(GetPropType)^.MaxLength else
     //Result := 255;
     Result := 1023;

Is it possible to make SessionProperties without limit?


Quoting Mattias Gaertner <nc-gaertnma at netcologne.de>:

> On Tue, 04 Mar 2008 16:44:25 +0000
> Paulo Malheiros <paulo.malheiros at fe.up.pt> wrote:
>> Hello,
>> I've been using SessionProperties intensely in my applications but a
>> problem showed up when one of my Forms became to big.
>> After restarting the project several properties previously added in
>> SessionProperties disappeared.
>> I made a little test application and realized that the project is
>> well saved, with all properties present in my "main.lfm" file, but
>> after reopening and closing the project the same SessionProperties
>> appear only with 255 characters.
> This works here.
>> It appears that while opening the project Lazarus is deleting some
>> of this properties.
>> Does anyone have a suggestion on how to add more properties?
> Mattias
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

More information about the Lazarus mailing list