[fpc-devel] SetPropValue case sensitive
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. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] SetPropValue case sensitive
Leonardo M. Ramé wrote: 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? 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 ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] SetPropValue case sensitive
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 --- On Tue, 5/5/09, Sergei Gorelkin sergei_gorel...@mail.ru wrote: From: Sergei Gorelkin sergei_gorel...@mail.ru Subject: Re: [fpc-devel] SetPropValue case sensitive To: FPC developers' list fpc-devel@lists.freepascal.org Date: Tuesday, May 5, 2009, 2:44 PM Leonardo M. Ramé wrote: 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? 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 ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] SetPropValue case sensitive
Leonardo M. Ramé wrote: 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 ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] SetPropValue case sensitive
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 --- On Tue, 5/5/09, Bogusław Brandys bran...@o2.pl wrote: From: Bogusław Brandys bran...@o2.pl Subject: Re: [fpc-devel] SetPropValue case sensitive To: FPC developers' list fpc-devel@lists.freepascal.org Date: Tuesday, May 5, 2009, 3:06 PM Leonardo M. Ramé wrote: 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 ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] SetPropValue case sensitive
On Tue, May 5, 2009 at 3:36 PM, Leonardo M. Ramé martinr...@yahoo.com wrote: Download this PDF and search for SetPropValue: I think it's more probable that the documentation wasn't updated then that Variants aren't supported. -- Felipe Monteiro de Carvalho ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel