Forum > Designer

using DFM in both Delphi and Lazarus

(1/5) > >>

PeterX:
Hi all,

new thread about a well known building site..

Today I reopened a DFM in Delphi and Delphi complains
"EReadError .. Property doesn't exist" - It's 


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---LCLVersion = '1.6.0.4'

Leledumbo:
Just remove it by hand, of course Delphi has no idea at all about LCLVersion.

PeterX:
The new Lazarus-DFM is about 2 times larger than the original DFM.
That would be a lot of work. I simply recovered from backup.

JuhaManninen:
Yes, using the same .dfm file between Delphi and Lazarus projects is problematic. That is why the Delphi converter in Lazarus creates a new .lfm file by default. A common .dfm file can be selected but it is useful only in some simple cases.
A downside of having separate .dfm and .lfm files is obviously that all layout changes must be done in 2 places.

PeterX:

--- Quote from: JuhaManninen on September 20, 2016, 03:25:56 pm ---A common .dfm file can be selected but it is useful only in some simple cases.

--- End quote ---
I can see no simple case.

From the moment when Lazarus writes

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---LCLVersioninto the DFM file, Delphi 5 fails to read.

Navigation

[0] Message Index

[#] Next page

Go to full version