Changeset 9 for trunk


Ignore:
Timestamp:
Apr 22, 2016, 8:35:20 AM (9 years ago)
Author:
chronos
Message:
  • Fixed: Error in open file if previously file was closed.
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        22AcronymDecoder.exe
        33AcronymDecoder.lps
         4AcronymDecoder
         5heaptrclog.trc
         6
  • trunk/AcronymDecoder.lpi

    r5 r9  
    147147    </CodeGeneration>
    148148    <Linking>
     149      <Debugging>
     150        <UseHeaptrc Value="True"/>
     151      </Debugging>
    149152      <Options>
    150153        <Win32>
     
    153156      </Options>
    154157    </Linking>
     158    <Other>
     159      <CustomOptions Value="-dDEBUG"/>
     160    </Other>
    155161  </CompilerOptions>
    156162  <Debugging>
  • trunk/AcronymDecoder.lpr

    r4 r9  
    88  {$ENDIF}{$ENDIF}
    99  Interfaces, // this includes the LCL widgetset
    10   Forms, UFormMain, UAcronym, synapse, UFormImport, Common, TemplateGenerics,
     10  Forms, UFormMain, UAcronym, synapse, UFormImport, Common, SysUtils, TemplateGenerics,
    1111  UFormAcronym
    1212  { you can add units after this };
     
    1414{$R *.res}
    1515
     16{$IFDEF DEBUG}
     17const
     18  HeapTraceLog = 'heaptrclog.trc';
     19{$ENDIF}
     20
     21
    1622begin
    17   Application.Title:='Acronym Decoder';
    18   RequireDerivedFormResource:=True;
     23  {$IFDEF DEBUG}
     24  // Heap trace
     25  DeleteFile(ExtractFilePath(ParamStr(0)) + HeapTraceLog);
     26  SetHeapTraceOutput(ExtractFilePath(ParamStr(0)) + HeapTraceLog);
     27  {$ENDIF}
     28
     29  Application.Title := 'Acronym Decoder';
     30  RequireDerivedFormResource := True;
    1931  Application.Initialize;
    2032  Application.CreateForm(TFormMain, FormMain);
  • trunk/Packages/Common/Common.pas

    r5 r9  
    55unit Common;
    66
     7{$warn 5023 off : no warning about unused units}
    78interface
    89
  • trunk/Packages/TemplateGenerics/TemplateGenerics.pas

    r5 r9  
    55unit TemplateGenerics;
    66
     7{$warn 5023 off : no warning about unused units}
    78interface
    89
  • trunk/Packages/synapse/synapse.pas

    r5 r9  
    55unit synapse;
    66
     7{$warn 5023 off : no warning about unused units}
    78interface
    89
  • trunk/UFormMain.lfm

    r7 r9  
    55  Width = 631
    66  Caption = 'Acronym Decoder'
    7   ClientHeight = 421
     7  ClientHeight = 414
    88  ClientWidth = 631
    99  Menu = MainMenu1
     
    1313  OnDestroy = FormDestroy
    1414  OnShow = FormShow
    15   LCLVersion = '1.6.0.4'
     15  LCLVersion = '1.7'
    1616  object ListViewAcronyms: TListView
    1717    Left = 8
    18     Height = 372
     18    Height = 365
    1919    Top = 40
    2020    Width = 613
     
    4646  object EditSearch: TEdit
    4747    Left = 8
    48     Height = 28
     48    Height = 34
    4949    Top = 8
    5050    Width = 611
  • trunk/UFormMain.pas

    r8 r9  
    175175begin
    176176  OpenDialog1.DefaultExt := ProjectExt;
    177   OpenDialog1.FileName := AcronymDb.FileName;
     177  if Assigned(AcronymDb) then
     178    OpenDialog1.FileName := AcronymDb.FileName;
    178179  if OpenDialog1.Execute then begin
     180    AFileClose.Execute;
     181    AFileNew.Execute;
    179182    AcronymDb.LoadFromFile(OpenDialog1.FileName);
    180183    LastOpenedList1.AddItem(OpenDialog1.FileName);
     
    380383  AFileSaveAs.Enabled := Assigned(AcronymDb);
    381384  EditSearch.Enabled := Assigned(AcronymDb);
     385  AImport.Enabled := Assigned(AcronymDb);
    382386
    383387  Title := Application.Title;
Note: See TracChangeset for help on using the changeset viewer.