I found a difference between Delphi's SetPropValue function with its counterpart in FPC. In Delphi, this function is case insensitive, while in fpc it is case sensitive.
Am I correct?
Leonardo.

Mailing lists / fpc-devel / 2009-05
6 messages · 4 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
I found a difference between Delphi's SetPropValue function with its counterpart in FPC. In Delphi, this function is case insensitive, while in fpc it is case sensitive.
Am I correct?
Leonardo.
Leonardo M. Ramé wroteI found a difference between Delphi's SetPropValue function with its counterpart in FPC. In Delphi, this function is case insensitive, while in fpc it is case sensitive. Am I correct?
The property name comparison (ending up in GetPropInfo(TypeInfo: PTypeInfo; const PropName: string),
rtl/objpas/typinfo.pp line 571) is done case-insensitive, unless there is a bug somewhere.
Can you provide code snippet illustrating the difference?
Sergei
I studied a little deeper and the problem is (according to FPC 2.2.2 manual) that SetPropValue doesn't work because Variants are not implemented yet.
The solution was easy, I used SetStrProp instead of SetPropValue. In my program all published properties were strings.
Can you confirm if it is implemented in newer versions?
Leonardo M. Ramé
http://leonardorame.blogspot.com
Hmm..I thought that variants were supported long time ago but my memory is bad.
Are you sure about that ?
Boguslaw
Download this PDF and search for SetPropValue:
http://www.eg.bucknell.edu/~cs208/subpages/software/share/doc/fpc-2.2.2/fpc-2.2.2/rtl.pdf
Leonardo M. Ramé
http://leonardorame.blogspot.com
Leonardo M. Ramé wroteDownload this PDF and search for SetPropValue:
I think it's more probable that the documentation wasn't updated then that Variants aren't supported.