[lazarus] Editor
Michael Van Canneyt
michael.vancanneyt at wisa.be
Tue Oct 19 04:45:04 EDT 1999
> In order to get parts of mwEdit working, I had to add a Registry unit to the LCL
> and also a Windows unit. The Windows unit is ONLY for compatibility with Delphi.
> It contains some constants and type definitions and that is all. We need to make
> sure that nobody puts any M$ Windows API calls in it. I haven't implemented any
> of the methods in the Registry units because we still need to decide how we are
> going to implement that in a cross platform manner (meaning, how we will do it
> in Linux). I checked in the Registry and Windows units to CVS.
But the windows unit is present in the RTL of win32. You should not use it directly
in the LCL !
To implement a registry, you should do something like
{$ifdef win32}
Function SomeRegistryCall(); stdcall; external 'kernel32' name '...';
..
{$endif }
{$ifdef linux}
FUnction SomeRegistryCall();
begin
// Code for linux emulation of registry...
end;
{$endif}
Putting the 'windows' unit in the LCL will create problems with portability.
> Between both of these editors, I think we can get one (or both) of them working
> very soon now.
>
> If anyone wants to start working out some way to implement the Registry units
> so they work in both Windows and Linux, that would be very helpful.
How would you do it on Linux ? One big 'Ini' file in /etc ?
You'll have to agree on a location for this.
Michael.
More information about the Lazarus
mailing list