C++Builder 5: SetPropValue w. boolean property


2005-07-31 11:59:05 PM
cppbuilder1
Hello,
there seems to be a bug in SetPropValue with a boolean property.
The corresponding property is not set correctly.
Code example - just used a TButton and its ShowHint-property:
bool bProperty ;
Variant vValue ;
int iType ;
bool bPublishedProperty ;
bProperty = btpPROP_Test->ShowHint ;
bProperty = true ;
btpPROP_Test->ShowHint = bProperty ;
bProperty = btpPROP_Test->ShowHint ;
bProperty = false ;
btpPROP_Test->ShowHint = bProperty ;
bProperty = btpPROP_Test->ShowHint ;
iType = vValue.Type() ;
vValue = true ;
iType = vValue.Type() ;
bPublishedProperty = IsPublishedProp( btpPROP_Test, "ShowHint" ) ;
SetPropValue( btpPROP_Test, "ShowHint", vValue ) ;
bProperty = btpPROP_Test->ShowHint ;
SetPropValue( btpPROP_Test, "ShowHint", false ) ;
bProperty = btpPROP_Test->ShowHint ;
SetPropValue( btpPROP_Test, "ShowHint", true ) ;
bProperty = btpPROP_Test->ShowHint ;
I have found one very old thread (without answer...):
groups.google.de/group/borland.public.delphi.objectpascal/browse_thread/thread/60261f37aa7379de/ed3204806e165ca2
Does anybody know a workaround? I must use SetPropValue, because I must have
access to the property via its name.
Thanks and greetings
Udo