Forum > Designer
Getting format error loading form
(1/1)
MISV:
My usual Windows/Delphi to Mac/Lazarus process is to have Lazarus open the Windows form file and remove all invalid properties. This generally works well.
However, today I for the first time got a funky error *after* this when trying to load the form
Format error
--- Quote ---Unable to convert text form data of file "...path..." into binary stream. (Wrong token type: = expected byt Symbol found (at 326,24, stream offset 00002059))
--- End quote ---
The offending line appears to be
--- 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";}};} --- Style = csDropDown
If we assume first COL is 1 then "=" is placed on COL 25 (but if zero indexed it is ar 24)
I read this as an error in occuring in the reader (and not an error in actually trying to convert this to a "live" component on the form)
Any ideas?
n7800:
I have no idea if this is related, but I want to share a similar error, which with its "hint" confused me as much as possible and took a lot of time: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41323
If you want to investigate this, then try opening your file in another version of Lazarus to see if this is a regression. If so, then it will be easy to find the culprit commit.
wp:
--- Quote from: MISV on January 23, 2025, 08:42:52 am ---
--- Quote ---Unable to convert text form data of file "...path..." into binary stream. (Wrong token type: = expected byt Symbol found (at 326,24, stream offset 00002059))
--- End quote ---
--- End quote ---
Recently I had the same or a similar error after I had modified a package and did not do a clean rebuild of the IDE. So, maybe just try that.
MISV:
I think you may be right.
I imported the form into Lazarus on Windows. No problems. And moving the file to my Mac afterwards works. So it must be some versioning difference between them. (Mac version newer)
Navigation
[0] Message Index