Changeset 56 for trunk/UAcronym.pas
- Timestamp:
- Jul 26, 2016, 2:13:41 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UAcronym.pas
r52 r56 216 216 ImportFormats: TImportFormats; 217 217 Modified: Boolean; 218 AddedCount: Integer; 218 219 constructor Create; 219 220 destructor Destroy; override; … … 250 251 SRemoveOnStart = 'Remove on start'; 251 252 SUnsupportedAuthMethod = 'Unsupported HTTP authorization method'; 253 SFileNotFound = 'File %s not found'; 252 254 253 255 … … 323 325 NewAcronym.Name := SQLQuery1.FieldByName('Acronym').AsString; 324 326 NewAcronym.Meaning := SQLQuery1.FieldByName('Meaning').AsString; 325 Sources.AcronymDb.AddAcronym(NewAcronym.Name, NewAcronym.Meaning); 327 if (NewAcronym.Name <> '') and (NewAcronym.Meaning <> '') then 328 Sources.AcronymDb.AddAcronym(NewAcronym.Name, NewAcronym.Meaning); 326 329 SQLQuery1.Next; 327 330 Inc(ItemCount); … … 489 492 Delete(S, 1, P + Length(EndString) - 1); 490 493 491 if (Flag = ipfNewItem) and ( Trim(NewAcronym.Name)<> '') and492 ( Trim(NewAcronym.Meaning)<> '') then begin494 if (Flag = ipfNewItem) and (NewAcronym.Name <> '') and 495 (NewAcronym.Meaning <> '') then begin 493 496 AddedAcronym := Sources.AcronymDb.AddAcronym(NewAcronym.Name, NewAcronym.Meaning); 494 497 AddedAcronym.Description := NewAcronym.Description; … … 749 752 S.Free; 750 753 end; 751 end else ShowMessage( 'File ' + URL + ' not found');754 end else ShowMessage(SysUtils.Format(SFileNotFound, [URL])); 752 755 end; 753 756 … … 823 826 begin 824 827 Categories := TStringList.Create; 828 Name := ''; 829 Meaning := ''; 830 Description := ''; 825 831 end; 826 832 … … 1432 1438 Meaning.Acronym := Acronym; 1433 1439 Acronym.Meanings.Add(Meaning); 1440 Inc(AddedCount); 1434 1441 end; 1435 1442 Result := Meaning;
Note:
See TracChangeset
for help on using the changeset viewer.