You are correct, but I haven't gotten to that. I will do it tomorrow. It was on my list of things to do...
Shane

Mailing lists / lazarus / 2001-01
4 messages · 3 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
You are correct, but I haven't gotten to that. I will do it tomorrow. It was on my list of things to do...
Shane
Hi all,
I don't think, that resources are IDE specific. Perhaps you can call the IDE some kind of resource editor.
The LFM files could be IDE specific, because they are only usable by IDE(s). The LFC files should belong to the LCL, because they are simply streamed components in resource format. The forms.pp depends on the resources (e.g. formdata and application icon).
Therefore I would suggest:
-put lresources into the lcl directory
-move LFM procedures into IDE
-add function FormToLCLResource(ResStream:TStream):integer; to lresources.pp
-rename LazarusResources to LCLResources (Marc)
function FormToLCLResource(AForm:TForm;
ResStream:TStream):integer;
// 0 = ok
// -1 = error while streaming AForm to binary stream
// -2 = error while streaming binary stream
// to resource stream
var BinStream:TMemoryStream;
Driver: TAbstractObjectWriter;
Writer:TWriter;
begin
BinStream:=TMemoryStream.Create;
try
try
Driver:=TBinaryObjectWriter.Create(BinStream,4096);
try
Writer:=TWriter.Create(Driver);
try
Writer.WriteDescendent(AForm,nil);
finally
Writer.Free;
end;
finally
Driver.Free;
end;
except
Result:=-1;
exit;
end;
try
BinStream.Position:=0;
BinaryToLazarusResourceCode(BinStream,ResStream);
except
Result:=-1;
exit;
end;
finally
BinStream.Free;
end;
end;Mattias
I think the current location of lresources is not OK
To build the LCL only the lcl subtree is required. lresources is needed by forms.pp and is located in the root.
I think it should be split up in a part for the LCL and a part dedicated to the ide (LFM stuff) or is should be removed form forms.pp
Marc
I don't think, that resources are IDE specific. Perhaps you can call the IDE some kind of…
+ From: Mattias Gaertner
+
+ Hi all,
+
+ I don't think, that resources are IDE specific. Perhaps you can call the
+ IDE some kind of resource editor.
KindOf
+ The LFM files could be IDE specific, because they are only usable by
+ IDE(s). The LFC files should belong to the LCL, because they
+ are simply streamed components in resource format.
They are streamed components indeed, but you may stream them in anything you want, so I won't call them LFC. In that case LFC don't belong to the LCL but the functionality to create "compiled resources" does.
+ The forms.pp depends on the resources (e.g.
+ formdata and application icon).
+ Therefore I would suggest:
+ -put lresources into the lcl directory
+ -move LFM procedures into IDE
+ -add function FormToLCLResource(ResStream:TStream):integer; to lresources.pp
+ -rename LazarusResources to LCLResources (Marc)
[Snipped some code]
+ try
+ BinStream.Position:=0;
+ BinaryToLazarusResourceCode(BinStream,ResStream);BinaryToLCLResourceCode ???
Marc