<div dir="ltr">Something wrong in the dpr then?<div><br></div><div>Cheers,</div><div>Karl</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 24, 2018 at 2:09 PM, Errol Anderson <span dir="ltr"><<a href="mailto:errol.anderson@gsds.co.nz" target="_blank">errol.anderson@gsds.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-NZ" link="blue" vlink="purple"><div class="m_6393495033942597048WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi Karl<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Thanks for the conversion code – however, my dfm is text, sorry I did not confirm this earlier. I have reviewed the dfm – all 12,000+ lines but nothing obvious. I believe the cause of the form-loading error is more subtle than a detectable error in the dfm text, as the program compiles and displays the form. What puzzles me is that I have reverted to versions from the _history folder which were previously working correctly, and still get the error. <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Regards<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Errol <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><a name="m_6393495033942597048__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></a></p><p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Karl Reynolds [mailto:<a href="mailto:kreynolds@chocfishsoft.co.nz" target="_blank">kreynolds@<wbr>chocfishsoft.co.nz</a>] <br><b>Sent:</b> Tuesday, 23 January 2018 4:05 PM<br><b>To:</b> NZ Borland Developers Group - Delphi List <<a href="mailto:delphi@listserver.123.net.nz" target="_blank">delphi@listserver.123.net.nz</a>><br><b>Subject:</b> Re: [DUG] Error loading form<u></u><u></u></span></p><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">If your form is a binary form (as David said, text is recommended because of situations like this), you can convert it to text by creating a new form with a button that uses ObjectBinaryToText.<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">LMemoryStream := nil;<u></u><u></u></p></div><div><p class="MsoNormal">LFileStream := nil;<u></u><u></u></p></div><div><p class="MsoNormal">LMyForm := TMyForm.Create; // TMyForm is the form you want a text version of<u></u><u></u></p></div><div><p class="MsoNormal">try<u></u><u></u></p></div><div><div><p class="MsoNormal"> LMemoryStream := TMemoryStream.Create;<u></u><u></u></p></div><div><p class="MsoNormal"> LMemoryStream.<wbr>WriteComponent(LMyForm);<u></u><u></u></p></div><div><p class="MsoNormal"> LMemoryStream.Position := 0;<u></u><u></u></p></div><div><p class="MsoNormal"> LFileStream := TFileStream.Create('c:\<wbr>yourformname.dfm'); // or wherever you want to put it and whatever you want to call it<u></u><u></u></p></div><div><p class="MsoNormal"> ObjectBinaryToText(<wbr>LMemoryStream, LFileStream);<u></u><u></u></p></div><div><p class="MsoNormal">finally<u></u><u></u></p></div><div><p class="MsoNormal"> LMemStream.Free;<u></u><u></u></p></div><div><p class="MsoNormal"> LFileStream.Free;<u></u><u></u></p></div><div><p class="MsoNormal"> LMyForm.Free;<u></u><u></u></p></div><div><p class="MsoNormal">end;<u></u><u></u></p></div></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Cheers,<u></u><u></u></p></div><div><p class="MsoNormal">Karl<u></u><u></u></p></div></div><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">On Tue, Jan 23, 2018 at 2:31 PM, Errol Anderson <<a href="mailto:errol.anderson@gsds.co.nz" target="_blank">errol.anderson@gsds.co.nz</a>> wrote:<u></u><u></u></p><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm"><div><div><p class="MsoNormal">After a (worrying) computer crash, it appeared that my main form, main.pas, was corrupted. So I reverted to main.pas and main.dfm which I had committed to the git server last night.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Now when I open the project or the main form using Delphi XE10.1, I get the following error, and I cannot display the form on pressing F12.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"><img border="0" width="359" height="119" id="m_6393495033942597048m_-2545097662044636806Picture_x0020_2" src="cid:image001.png@01D3951A.5930B910"><u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">However, the program compiles and displays the form when I run it, so it looks like main,dfm is substantially OK. <u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Any ideas how I can retrieve the form would be most welcome.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Thanks and regards<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Errol<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"><span lang="EN-US" style="color:red">Errol Anderson </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt">Geothermal Resource Analyst | Software Development</span><u></u><u></u></p><p class="MsoNormal"><span lang="DA" style="font-size:10.0pt">GSDS Ltd </span><span lang="EN-US" style="font-size:10.0pt"><a href="http://www.gsds.co.nz/" target="_blank"><span lang="DA">www.gsds.co.nz</span></a></span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt">Mob: <a href="tel:+64%2021%20181%203367" target="_blank">+64 (0)21 181 3367</a></span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt">Email: <a href="mailto:errol.anderson@gsds.co.nz" target="_blank">errol.anderson@gsds.co.nz</a></span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt">Skype: errol_anderson</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US" style="font-size:2.0pt"> </span><u></u><u></u></p><p class="MsoNormal"><img border="0" width="288" height="49" id="m_6393495033942597048m_-2545097662044636806Picture_x0020_1" src="cid:image002.jpg@01D3951A.5930B910" alt="Logo_final2_90"><u></u><u></u></p><p class="MsoNormal"><span lang="EN-AU" style="font-size:8.0pt">This communication and any attached material contains confidential information intended only for the use of the addressee named above. No confidentiality is waived or lost by any mistaken transmission to you. If you have received this message in error please delete the document and notify us immediately.</span><u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p></div></div><p class="MsoNormal"><br>______________________________<wbr>_________________<br>NZ Borland Developers Group - Delphi mailing list<br>Post: <a href="mailto:delphi@listserver.123.net.nz" target="_blank">delphi@listserver.123.net.nz</a><br>Admin: <a href="http://delphi.org.nz/mailman/" target="_blank">http://delphi.org.nz/mailman/</a>l<wbr>istinfo/delphi<br>Unsubscribe: send an email to delphi-request@listserver.123.<a href="http://net.nz" target="_blank"><wbr>net.nz</a> with Subject: unsubscribe<u></u><u></u></p></blockquote></div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></div><br>______________________________<wbr>_________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" rel="noreferrer" target="_blank">http://delphi.org.nz/mailman/<wbr>listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@listserver.123.net.nz">delphi-request@listserver.123.<wbr>net.nz</a> with Subject: unsubscribe<br></blockquote></div><br></div>