Changeset 51 for trunk/IDE/UProject.pas


Ignore:
Timestamp:
Apr 6, 2012, 9:43:56 AM (13 years ago)
Author:
chronos
Message:
  • Added: Project determines which source file is main program source.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IDE/UProject.pas

    r50 r51  
    357357    NewNode := Doc.DocumentElement.FindNode('MainSource');
    358358    if Assigned(NewNode) then begin
    359       MainSourceName := UTF8Encode(NewNode.TextSource);
    360 
     359      MainSourceName := UTF8Encode(NewNode.TextContent);
     360      MainSource := Files.SearchFile(MainSourceName);
    361361    end;
    362362
     
    385385    with RootNode do begin
    386386      NewNode := CreateElement('MainSource');
    387       NewNode.TextContent := UTF8Decode(MainSource.FileName);
     387      if Assigned(MainSource) then
     388        NewNode.TextContent := UTF8Decode(MainSource.FileName);
    388389      AppendChild(NewNode);
    389390
     
    419420  Files.Clear;
    420421  Packages.Clear;
     422  MainSource := nil;
    421423end;
    422424
Note: See TracChangeset for help on using the changeset viewer.