I wanted to use a form previous ly created using Delphi (DFM) in my Lazarus project, so I converted it to a Lazarus form text file (LFM). But I found that, if I edited the file and then built the project, the previous version was restored. I found that there was another copy in "
lib\i386-win32\", so I used that in my project inspector. But now I made some edits using the WYSIWYG editor, and I got an error that the backup file could not be written to (I had made ir R/O). But now a dialog box seems to be "stuck" and I can't seem to close it. See attachments:
Actually, the application was running, so when it stopped, the form closed. I'm still confused about how the WYSIWIG editor interacts with the LFM files for the project. It works when I save the files and then copy them to two or three places, but sometimes the IDE changes the form from "
TfmLazSerial_Test" to the previous "
TfmComDrv32_Test". And then a default blank form appears when the application runs. I'm confused about how these various dependencies work, as well as the directives in the project and source files:
unit serialtestcpdrvmain;
{$mode objfpc}{$H+}
interface
...
implementation
{$R *.lfm}
{ TfmSerialTestCPdrv }
Project file (
I removed the directives from my current project - didn't seem to make much difference)
program LazSerial_Test;
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, LazSerialPort, LazSerial_TestMain;
begin
// RequireDerivedFormResource:=True;
Application.Initialize;
Application.CreateForm(TfmLazSerial_Test, fmLazSerial_Test);
Application.Run;
end.