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
{ private declarations }
public
{ public declarations }
end;
All were saved correctly. Closing Lazarus and checking "unit1.lfm" I got
SessionProperties =
'Edit1.Text;Edit10.Text;Edit11.Text;Edit12.Text;Edit13.Text;Edit14.Text;Edit15.Text;Edit16.Text;Edit17.Text;Edit18.Text;Edit19.Text;Edit2.Text;Edit20.Text;Edit3.Text;Edit4.Text;Edit5.Text;Edit6.Text;Edit7.Text;Edit8.Text;Edit9.Text;Edit21.Text;Edit22.Text;Edit23.Text'
After reopening Lazarus and opening SessionProperties Dialog one property was missing.
After saving and exiting Lazarus reopened "unit1.lfm" I got
SessionProperties =
';Edit1.Text;Edit10.Text;Edit11.Text;Edit12.Text;Edit13.Text;Edit14.Text;Edit15.Text;Edit16.Text;Edit17.Text;Edit18.Text;Edit19.Text;Edit2.Text;Edit20.Text;Edit21.Text;Edit22.Text;Edit3.Text;Edit4.Text;Edit5.Text;Edit6.Text;Edit7.Text;Edit8.Text;Edit9.Text'
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;
begin
if GetPropType^.Kind = tkString then
Result := GetTypeData(GetPropType)^.MaxLength else
//Result := 255;
Result := 1023;
end;
Is it possible to make SessionProperties without limit?
Regards,
Paulo
Quoting Mattias Gaertner :
Show quoted text 27 lines
On Tue, 04 Mar 2008 16:44:25 +0000
Paulo Malheiros 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
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus