anchor.diff:  procedure TMainForm.btnOpenFileClicked(Sender: TObject);
   var
     s: TfpgString;
  +begin
  +  s := SelectFileDialog(sfdOpen, Format(cFileFilterTemplate, ['Source Files', cSourceFiles, cSourceFiles]));
  +  if s <> '' then
  +  begin
  +    OpenEditorPage(s);
  +  end;
  +end;
  +
  +procedure TMainForm.miFileSaveAs(Sender: TObject);
  +var
  +  s: TfpgString;
  +begin
  +  s := SelectFileDialog(sfdSave);
  +  if s <> '' then
  +  begin
  +    TfpgMemo(pcEditor.ActivePage.Components[0]).Lines.SaveToFile(s);
  +  end;
  +end;
  +
  +procedure TMainForm.miAboutFPGuiClicked(Sender: TObject);
  +begin
  +  TfpgMessageDialog.AboutFPGui;
  +end;
  +
  +procedure TMainForm.miAboutIDE(Sender: TObject);
  +begin
  +  TfpgMessageDialog.Information('About fpGUI IDE', 'Created by Graeme Geldenhuys');
  +end;
  +
  +procedure TMainForm.miRunMake(Sender: TObject);
  +var
  +  p: TProcess;
  +begin
  +  p := TProcess.Create(nil);
  +  p.ShowWindow := swoShowNormal;
  +  p.CommandLine := gINI.ReadString(cEnvironment, 'Compiler', '') +
  +      ' ' + '/tmp/' + pcEditor.ActivePage.Text;
  +  p.Execute;
  +  AddMessage('Compilation complete');
  +  p.Free;
  +end;
  +
  +procedure TMainForm.miConfigureIDE(Sender: TObject);
  +begin
  +  DisplayConfigureIDE;
  +end;
  +
  +procedure TMainForm.miViewDebug(Sender: TObject);
  +begin
  +  if not Assigned(DebugForm) then
  +    fpgApplication.CreateForm(TDebugForm, DebugForm);
  +  DebugForm.Show;
  +end;
  +
  +procedure TMainForm.TabSheetClosing(Sender: TObject; ATabSheet: TfpgTabSheet);
  +var
  +  n: TfpgTreeNode;
  +begin
  +  n := tvProject.RootNode.FindSubNode(ATabSheet, True);
  +  if Assigned(n) then
  +  begin
  +    tvProject.RootNode.Remove(n);
  +    n.Free;
  +    tvProject.Invalidate;
  +  end;
  +end;
  +
  +procedure TMainForm.UpdateStatus(const AText: TfpgString);
  +begin
  +  lblStatus.Text := AText;
  +end;
  +
  +procedure TMainForm.SetupProjectTree;
  +begin
  +  tvProject.RootNode.AppendText('Units');
  +  tvProject.RootNode.AppendText('Images');
  +  tvProject.RootNode.AppendText('Help Files');
  +  tvProject.RootNode.AppendText('Text');
  +  tvProject.RootNode.AppendText('Other');
  +end;
  +
  +procedure TMainForm.SetupFilesGrid;
  +begin
  +  grdFiles.FileList.FileMask := AllFilesMask;
  +  grdFiles.FileList.ShowHidden := False;
  +  grdFiles.FileList.ReadDirectory;
  +  grdFiles.FileList.Sort(soFileName);
  +  grdFiles.Invalidate;
  +end;
  +
  +procedure TMainForm.AddMessage(const AMsg: TfpgString);
  +begin
  +  grdMessages.RowCount := grdMessages.RowCount + 1;
  +  grdMessages.Cells[0,grdMessages.RowCount-1] := AMsg;
  +end;
  +
  +procedure TMainForm.OpenEditorPage(const AFilename: TfpgString);
  +var
  +  s: TfpgString;
     f: TfpgString;
     n: TfpgTreeNode;
     i: integer;
     found: Boolean;
     ts: TfpgTabSheet;
   begin
  -  s := SelectFileDialog(sfdOpen, Format(cFileFilterTemplate, ['Source Files', cSourceFiles, cSourceFiles]));
  -  if s <> '' then
  -  begin
  +  s := AFilename;
       f := fpgExtractFileName(s);
       found := False;
       for i := 0 to pcEditor.PageCount-1 do
  
positive.code:     procedure   SetupProjectTree;
      procedure   SetupFilesGrid;
      procedure   AddMessage(const AMsg: TfpgString);
    public
      constructor Create(AOwner: TComponent); override;
      procedure   AfterCreate; override;
  
negative.code:       n.Data := ts;
        tvProject.Selection := n;
      end;
  
  end;
  
  procedure TMainForm.FormShow(Sender: TObject);
  