Ignore:
Timestamp:
Feb 16, 2015, 10:42:24 PM (10 years ago)
Author:
chronos
Message:
  • Added: Czech translation for most of interface texts.
  • Fixed: Creation of new table fields.
  • Fixed: Saving XML database on exit.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormFields.pas

    r8 r11  
    5959{$R *.lfm}
    6060
     61resourcestring
     62  SNewField = 'New field';
     63  SFieldsNotSet = 'Fields not set';
     64  STableFields = 'Table fields - %s';
     65
    6166{ TFormFields }
    6267
    6368procedure TFormFields.FormShow(Sender: TObject);
     69var
     70  I: Integer;
    6471begin
     72  for I := 0 to ToolBar1.ButtonCount - 1 do
     73    ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption;
    6574  if not Assigned(Fields) then
    66     raise Exception.Create('Fields not set');
    67   Caption := 'Table fields - ' + TableName;
     75    raise Exception.Create(SFieldsNotSet);
     76  Caption := Format(STableFields, [TableName]);
    6877  UpdateInterface;
    6978  ReloadList;
     
    7685  NewField := TField.Create;
    7786  NewField.Table := Fields.Table;
    78   NewField.Name := 'New field';
     87  NewField.Name := SNewField;
     88  if Fields.Table.Database.Engine.DataTypes.Count > 0 then
     89    NewField.DataType := TDataType(Fields.Table.Database.Engine.DataTypes[0]);
    7990  FormField.Load(NewField);
    8091  if FormField.ShowModal = mrOk then begin
Note: See TracChangeset for help on using the changeset viewer.