- changed version to 1.2 (develop)
- changed title to TValueHelper.TryToType is defect
- changed milestone to 1.2
- marked as bug
- edited description
- changed component to Base
- marked as critical
-
assigned issue to
TValueHelper.TryToType is defect
Issue #181
resolved
function TValueHelper.TryToType<T>(out targetValue: T): Boolean;
var
value: TValue;
begin
Result := TryConvert(System.TypeInfo(T), value);
if Result then
begin
if TValueData(Self).FTypeInfo = nil then
begin
FillChar(Pointer(@targetValue)^, SizeOf(T), 0);
Exit;
end;
ExtractRawData(@targetValue); //maybe this line must look as Value. ExtractRawData(@targetValue);?
end;
end;
We try use TValueHelper from spring in Knockoff framework. We binding controls and Nullable types fields. And when control value change the program call method
procedure TDependentObservable<T>.SetValue(const value: TValue);
begin
Invoke(value.ToType<T>);
end;
Wich calling TValueHelper.TryToType. And in fine result Nullable<T> has only fValue without fHasValue.
Comments (4)
-
repo owner -
repo owner - changed status to resolved
fixed issue
#181→ <<cset 2d5f2e737aec>>
-
repo owner fixed issue
#181→ <<cset 2d5f2e737aec>>
-
repo owner - changed version to 1.2
- Log in to comment
This code is broken - I will fix it.