<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-03-22 16:59 GMT-03:00 luiz americo pereira camara <span dir="ltr"><<a href="mailto:luizmed@oi.com.br" target="_blank">luizmed@oi.com.br</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-03-22 16:32 GMT-03:00 Mattias Gaertner <span dir="ltr"><<a href="mailto:nc-gaertnma@netcologne.de" target="_blank">nc-gaertnma@netcologne.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span><span class="">On Sun, 22 Mar 2015 10:15:23 -0300<br></span><span class="">
> <a href="http://imagebin.ca/v/1vhYYNAJuxPx" target="_blank">http://imagebin.ca/v/1vhYYNAJuxPx</a> : Here two files have UnitName added in<br>
> lpi<br>
><br>
> <a href="http://imagebin.ca/v/1vhYLsrfpWDd" target="_blank">http://imagebin.ca/v/1vhYLsrfpWDd</a> : One commit later, the same files have<br>
> UnitName removed<br>
><br>
> Is this a bug ?<br>
<br>
</span></span><span class="">Probably. Do you know how to reproduce it?<br></span></blockquote><div><br></div></div></div></div></blockquote><div><br></div><div>Found something that may be related:<br><br>Take the following entry:<br><br><Unit1><br> <Filename Value="views\mainview.pas"/><br> <IsPartOfProject Value="True"/><br> <ComponentName Value="MainViewForm"/><br> <HasResources Value="True"/><br> <ResourceBaseClass Value="Form"/><br></Unit1><br><br></div><div>In TUnitInfo.LoadFromXMLConfig:<br><br>A Filename is set to FileName ('views\mainview.pas')<br>AFilename:=XMLConfig.GetValue(Path+'Filename/Value','');<br><br></div><div>Later AFileName is set again this time to ResourceFileName, that is empty<br>AFilename:=XMLConfig.GetValue(Path+'ResourceFilename/Value','');<br><br></div><div>Later AFilename is checked before setting fUnitName:<br>if FilenameIsPascalSource(AFilename) then<br> fUnitName:=XMLConfig.GetValue(Path+'UnitName/Value',ExtractFileNameOnly(AFilename));<br><br></div><div>Since AFileName is empty, fUnitName will not be set<br><br><br><br></div><div>In the other side, in the following file<br><br> <Unit2><br> <Filename Value="models\patientclasses.pas"/><br> <IsPartOfProject Value="True"/><br> <UnitName Value="PatientClasses"/><br> </Unit2><br><br></div><div>fUnitName is set to empty at LoadFromXMLConfig, but at the time of saving fUnitName gets its correct value 'PatientClasses'. Could not detect where gets the correct value. Breakpoints at ImproveUnitNameCache, SetUnitName, ReadUnitSource and LoadFromXMLConfig<br><br></div><div>Luiz<br></div></div></div></div>