[lazarus] CVS Committed 01/12/2001
Mattias Gaertner
nc-gaertnma at netcologne.de
Sat Jan 13 13:34:05 EST 2001
You are right.
The lresources.pp has a bug.
The AnsiStrings must be initialized with nil. Here is a better solution:
procedure TLResourceList.Add(Name,ValueType,Value:AnsiString);
var NewPLResource:PLResource;
begin
GetMem(NewPLResource,SizeOf(LResource));
Pointer(NewPLResource^.Name):=nil;
Pointer(NewPLResource^.ValueType):=nil;
Pointer(NewPLResource^.Value):=nil;
NewPLResource^.Name:=Name;
NewPLResource^.ValueType:=uppercase(ValueType);
NewPLResource^.Value:=Value;
FList.Add(NewPLResource);
end;
But this is not the only bug.
In tmessagedlg.lfm is Borderstyle used. As I have written earlier on this
list, TBorderStyle is not streamable due to a bug in the fpc 1.1.
Remove the Borderstyle line and rebuild the dlgmessage.lrs with the lazres
program.
There is also the MouseMove bug. As soon as I move the mouse any LCL
program crashes.
> Now I have looked in DDD where this error is and it looks like that it is
> the line
> NewPLResource^.Value:=Value;
> in the file lresources.pp in procedure
> TLResourceList.Add(Name,ValueType,Value:AnsiString);
>
> cu Jens
More information about the Lazarus
mailing list