View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003273 | JEDI VCL | 00 JVCL Components | public | 2005-10-18 05:42 | 2006-04-05 06:34 |
Reporter | Krzysztof Raczkowski | Assigned To | obones | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 3.00 | ||||
Target Version | Fixed in Version | ||||
Summary | 0003273: JvMemoryData, problem with CopyStructure | ||||
Description | procedure TJvMemoryData.CopyStructure(Source: TDataSet; UseAutoIncAsInteger: Boolean); var I: Integer; begin if Source = nil then Exit; CheckInactive; for I := FieldCount - 1 downto 0 do Fields[I].Free; Source.FieldDefs.Update; /// !!!!!!!! This is v. dangerous ... if you do this ... Source.Free :) after /// CopyStructure /// FieldDefs := Source.FieldDefs; FieldDefs.Assign(Source); //it's better :) if FApplyMode <> amNone then AddStatusField; CheckStructure(UseAutoIncAsInteger); if FApplyMode <> amNone then HideStatusField; end; | ||||
Tags | No tags attached. | ||||
|
Ohh, this seems to be a thing that amased me with *.Font and all other properties in VCL ;-) Last version of RxMemoryData does not provide anything new FieldDefs-specific. So i'd just quote VCL 5 to argue that this assignment is absolutely safe: TDataSet ... property FieldDefs: TFieldDefs read FFieldDefs write SetFieldDefs; ... procedure TDataSet.SetFieldDefs(Value: TFieldDefs); begin FieldDefs.Assign(Value); end; |
|
Yes, FieldDefs is a property and the assign is done for us. So this is not a bug. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-10-18 05:42 | Krzysztof Raczkowski | New Issue | |
2006-02-14 13:07 | Arioch | Note Added: 0008556 | |
2006-04-05 06:34 | obones | Status | new => resolved |
2006-04-05 06:34 | obones | Resolution | open => no change required |
2006-04-05 06:34 | obones | Assigned To | => obones |
2006-04-05 06:34 | obones | Note Added: 0008974 |