[Lazarus] Exception in CreateForm after conversion from Delphi

Frederic Da Vitoria davitofrg at gmail.com
Fri Nov 22 12:15:21 CET 2013


2013/11/21 Juha Manninen <juha.manninen62 at gmail.com>

> On Thu, Nov 21, 2013 at 11:01 PM, Frederic Da Vitoria
> <davitofrg at gmail.com> wrote:
> > One bug report? Do you think these issues could be related? Or should I
> > create one report for the lpr+Initialize issue and one report for the
> .res?
>
> Let's start with one report.
> If you can provide a project that triggers the problem, I will test it.
>


I added the issue. http://mantis.freepascal.org/view.php?id=25354



During my tests, I had a new issue with the converter, which I did not
include in Mantis as it seemed distinct. Here is my directory setup:
 - d:\Delphi\Lazarus_Tests\Memo1_bak contains the files in Delphi version.
This is where I edit the files with Notepad++ in order to remove parts of
code before copying them to the next folder.
d:\Delphi\Lazarus_Tests\Memo1_bak\$ contains the files (units) which I have
removed from the original source.
 - d:\Delphi\Lazarus_Tests\Memo1 is the conversion folder, where I copy the
files from above and where the application I ask Lazarus to convert is.

During one of the code cleaning iterations, I hadn't cleaned properly
Memo1_bak so that the uses still contained a reference to a unit which I
thought I had removed from everywhere. I had removed the unit source. My
new issue is that the converter found the unit in
d:\Delphi\Lazarus_Tests\Memo1_bak\$ and converted it! As you can see, my
source does not contain any reference to Memo1_bak, I never opened any file
in d:\Delphi\Lazarus_Tests\Memo1_bak nor
d:\Delphi\Lazarus_Tests\Memo1_bak\$ with Lazarus, so I don't know how and
why it searched there.



One last comment: As far as I can see, when checking "Delphi support", the
converter does not rename the .dpr as .lpr and it keeps the .dfm files. I
understand why the converter does this, but I suggest it should be
mentioned in the documentation.

I had at one point a problem with the dfm files: the project wouldn't
compile because they were binary. So I opened the Delphi original project
in Delphi 6 and wrote the dfm from binary to text. My guess is that for
some reason, the converter did not write the lfm copies, so that the only
way to compile was using the dfm, which were binary. I am unable to
reproduce the issue (the converter now always writes the lfm files) and
sorry, I did not keep a copy of the conversion results, so this remark is
only for the record.

-- 
Frederic Da Vitoria
(davitof)

Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131122/65c146c1/attachment-0003.html>


More information about the Lazarus mailing list