anchor.diff:      procedure AddButtonClick(Sender: TObject);
       procedure RemoveButtonClick(Sender: TObject);
     private
  -    FDataSource: TDataSource;
  -    FDataset: TMemDataset;
  -    FGrid : TDBGrid;
  +    const IDX_NAME = 0;
  +    const IDX_TYPE = 1;
  +    const IDX_SIZE = 2;
  +    const IDX_FORMULA = 3;
  +  private
  +    FGrid : TStringGrid;
  +    FFormulaPanel : TPanel;
       FFormulas : TmFormulaFields;
  -    procedure OnSelectEditor (Sender: TObject; Column: TColumn; var Editor: TWinControl);
  -    procedure OnEditButtonClick (Sender : TObject);
  +    FEditor : TSynEdit;
  +    procedure OnSelectEditor (Sender: TObject; aCol, aRow: Integer; var Editor: TWinControl);
  +    procedure OnEditButtonClick (Sender: TObject; aCol, aRow: Integer);
       procedure OnEditingDone(Sender : TObject);
     public
       { public declarations }
  
positive.code: 
  procedure TFormulaFieldsConfFrame.AddButtonClick(Sender: TObject);
  begin
    FDataset.DisableControls;
    try
      FDataset.Append;
      FDataset.FieldByName('FldName').AsString := 'NEWFIELD';
      FDataset.FieldByName('FldType').AsString := 'DOUBLE';
      FDataset.FieldByName('FldFormula').AsString := '1';
      FDataset.Post;
    finally
      FDataset.EnableControls;
    end;
  end;
  
  procedure TFormulaFieldsConfFrame.RemoveButtonClick(Sender: TObject);
  begin
    if FDataset.IsEmpty then
      exit;
  
    FDataset.DisableControls;
    try
      FDataset.Delete;
    finally
      FDataset.EnableControls;
    end;
  end;
  
  procedure TFormulaFieldsConfFrame.OnSelectEditor(Sender: TObject; Column: TColumn; var Editor: TWinControl);
  begin
    if Column.FieldName = 'FldType' then
    begin
      if (Editor is TCustomComboBox) then
      begin
  
negative.code: var
    i : integer;
  begin
    for i := 0 to aFormulas.Count - 1 do
    begin
      FGrid.InsertColRow(false, i + 1);
      FGrid.Cells[IDX_NAME, i + 1] := aFormulas.Get(i).Name;
      if aFormulas.Get(i).DataType = fftString then
      begin
        FGrid.Cells[IDX_TYPE, i + 1] := 'STRING';
        FGrid.Cells[IDX_SIZE, i + 1] := IntToStr(aFormulas.Get(i).Size);
      end
      else if aFormulas.Get(i).DataType = fftFloat then
        FGrid.Cells[IDX_TYPE, i + 1] := 'DOUBLE'
      else
        FGrid.Cells[IDX_TYPE, i + 1] := 'DATE';
      FGrid.Cells[IDX_FORMULA, i + 1] := aFormulas.Get(i).Formula;
      FGrid.Objects[IDX_NAME, i+1] := aFormulas.Get(i);
    end;
    FFormulas := aFormulas;
  end;
  