Ignore:
Timestamp:
Nov 30, 2017, 5:19:57 PM (7 years ago)
Author:
chronos
Message:
  • Fixed: Correctly set filename in open/save dialog.
  • Modified: Improved generation of compiler code.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/generator/Forms/UFormMain.pas

    r126 r127  
    4545    ToolButton1: TToolButton;
    4646    ToolButton2: TToolButton;
     47    ToolButton3: TToolButton;
     48    ToolButton4: TToolButton;
     49    ToolButton5: TToolButton;
     50    ToolButton6: TToolButton;
    4751    procedure ABuildCompilerExecute(Sender: TObject);
    4852    procedure AExitExecute(Sender: TObject);
     
    7882  SUnsavedChanges = 'Unsaved changes';
    7983  SDoYouWantToSaveProject = 'There are unsaved changes in project. Do you want to save them?';
    80   SNewGrammer = 'New grammer.xtg';
     84  SNewGrammer = 'New grammer.grm';
    8185
    8286  { TFormMain }
     
    96100procedure TFormMain.AProjectSaveAsExecute(Sender: TObject);
    97101begin
    98   SaveDialog1.FileName := Core.Grammer.FileName;
     102  SaveDialog1.InitialDir := ExtractFileDir(Core.Grammer.FileName);
     103  SaveDialog1.FileName := ExtractFileName(Core.Grammer.FileName);
    99104  if SaveDialog1.Execute then begin
    100105    Core.LastOpenedFile := SaveDialog1.FileName;
     
    192197  AProjectClose.Execute;
    193198  if not Assigned(Core.Grammer) then begin
    194     OpenDialog1.FileName := Core.LastOpenedFile;
     199    OpenDialog1.InitialDir := ExtractFileDir(Core.LastOpenedFile);
     200    OpenDialog1.FileName := ExtractFileName(Core.LastOpenedFile);
    195201    if OpenDialog1.Execute then begin
    196202      Core.LastOpenedFile := OpenDialog1.FileName;
Note: See TracChangeset for help on using the changeset viewer.