用起來和TClientDataSet中不多
如果要複製資料到另一個FDMemTable可以用
function TForm1.CopyFD(mt: TFDMemTable): TFDMemTable; begin Result := TFDMemTable.Create(nil); Result.Data := mt.Data; end;相當的簡單
function TForm1.CopyFD(mt: TFDMemTable): TFDMemTable; begin Result := TFDMemTable.Create(nil); Result.Data := mt.Data; end;相當的簡單
DBAccess.pas 3375 行 function TDAParam.GetIsNull: boolean; begin if IsBlobDataType then begin if DataType in [ftMemo, ftWideMemo] then Result := false else Result := TBlob(FParamObject).Size = 0;//原code是只要size為0就是null end else Result := inherited IsNull; end;
constructor TSmfCxGridPopupMenu.Create(AOwner: TComponent);
begin
inherited;
_CreateMenuItem(); //產生menuitem
end;
constructor TSmfCxGridPopupMenu.Create(AOwner: TComponent);
begin
inherited;
// 確定在 Run Time 時才有作用,不然會重覆
if not (csDesigning in ComponentState) then _CreateMenuItem();
end;
scxGridGroupByBoxCaption = '《托曳欄位至此可群組化》';//'Drag a column header here to group by that column';
TTest<T>.ToString; //不能編譯哦!
begin
Result := f.ToString;
end;
看了半天沒有很好的解決方案
唯一的方式只有這樣TToString<T> = reference to function(const AValue: T): string;procedure TForm2.Button1Click(Sender: TObject);
var
gen : TGenContainer<Integer>;
begin
gen := TGenContainer<Integer>.Create(
function(const AValue: Integer): string
begin
Result := IntToStr(AValue);
end);
end;
也就是說必需在傳入一個函式。
這樣有點麻煩就是