Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

RTTI, daCurrency, BUG!

edited April 2004 in General
Hi,

Using the RB7.01, I have TDischargeInfoRTTI = class(TraTObjectRTTI)

1) In the class function TDischargeInfoRTTI.GetPropRec(aClass: TClass;
const aPropName: string; var aPropRec: TraPropRec): Boolean

if CompareText(APropName, 'TotalAmount') = 0 then
PropToRec(APropName, daCurrency, False, APropRec)

Result: I can't use daCurrency, otherwise it never find the TotalAmount
property value, but passing daDouble works.

2)in the class function THBDischargeInfoRTTI.GetPropValue(aObject: TObject;
const aPropName: string; var aValue): Boolean;

I can't use:

if CompareText(APropName, 'TotalAmount') = 0 then
Currency(AValue) := THBDischargeInfoRTTI(aObject).TotalAmount;

Result: it cause the AValue = 0 always, but using Double(AValue) := ...,
works.


3)In the RAP code, local Currency variable can not be assigned to a currency
type Calc variable, the value of that Calc varaible always returns 0, unless
changing the local variable type from Currency to Double.

var
Amount: Currency;
begin
Amount := 5;
varAmount.Value := Amount; ====> always display $0.00
end;

var
Amount: Double;
begin
Amount := 5;
varAmount.Value := Amount; ====> displays $5.00;
end;


Has these issues been fixed in the RB7.03?

William

Comments

This discussion has been closed.