[RE: [Re: [lazarus] How are we going to store component data?]]

michael at tfdec1.fys.kuleuven.ac.be michael at tfdec1.fys.kuleuven.ac.be
Wed Jul 21 17:15:08 EDT 1999




On Wed, 21 Jul 1999, Michael A. Hess wrote:

> Michal Bukovjan wrote:
> > 
> > I'll try to straighten things up.
> 
> <large portion snipped>
>  
> > Maybe we still don't understand each other, in which case I apologize
> > and beg for further explanations.
> 
> I think I get what our confusion is here. We aren't talking about the
> same thing. You are talking about how the IDE-RAD will save and read the
> file data. I'm not worried about that yet. How that is done or what is
> done can't be decided until we decide what I am talking about.
> 
> Let's assume that the RAD has created said file, be that a binary file,
> source code file, XML file, whatever.
> 
> How do we get the code the developer wrote and this RAD generated file
> together. In Delphi the DFM (binary file) is attached to the application
> in a resource area of the application. When the program runs it reads
> this information when a TForm is loaded. It creates instances of any
> declared objects and sets up any required parameters. Fine.
> 
> We don't have a resource area in FPC apps (except for apps built for
> Windows). So how do we get the IDE-RAD built file and the code talking.
> Either we have to design and build some sort of resource area and then
> build a binobj utility to add this to the application or we use an
> {$I...} mechanism to add the data into the source. The data for the
> include could be source code that was saved by the IDE-RAD or if desired
> (probably best idea) is to have the IDE-RAD save the data as XML. Then
> before the actual compile is performed a utility is run that converts
> the XML data into pascal source code for inclusion.
> 
> The third option would be to tack the XML data onto the end of the
> application but then that would mean an XML parser would need to be
> included in every application. I'm not sure what kind of overhead that
> adds.
> 
> If we use the XML to source utility it means that other layout engines
> could be designed and built to produce the XML file.
> 
> 
> So is that what we are looking at. The IDE-RAD saves and works with an
> XML file which is then converted to source code for inclusion during
> compliation????

This will not work for TBitmaps and so on. How will you specify the bitmap
in pascal code ???

I think we should make some resource compiler after all. We'll need it
anyhow. On windows we can simply use Windows resources; on other platforms
we can do something else.

Michael.






More information about the Lazarus mailing list