Subject Re: [IBO] IBO 5.2.0.7: FieldsCharCase not working for Proper or Normal case
Author Ben Malings
Attempt #2...

I've found that only UPPER and LOWER seem to work with the FieldCharCase
property of a TIB_Query. I've fixed this for PROPER locally by making
the following change to TIB_ColumnVarText.GetValue:

case CharCase of
ccUpper: Result := iboUpperCase( Result );
ccLower: Result := iboLowerCase( Result );
{ PATCH START }
ccProper:
begin
tmpStr := iboLowerCase( Result );
if iboLength( tmpStr ) > 0 then
begin
Result := iboUpperCase(tmpStr[1]);
for i := 2 to iboLength( tmpStr ) do
Result := Result + ConvCharCase( tmpStr[i-1],
tmpStr[i],
ccProperCase );
end;
end;
{ PATCH END }
end;

This was adapted from code I found in TIB_CustomLabel.DoDrawText and
seems to work for Proper case; I guess something similar would be needed
for Normal case.

On 28/08/2013 00:09, IBO Support List wrote:
>
> For some reason this came to me all gobbled up.
>
> Would you please resend this message?
>
> Thanks,
> Jason
>
>
> -----Original Message-----
> From: IBObjects@yahoogroups.com <mailto:IBObjects%40yahoogroups.com>
> [mailto:IBObjects@yahoogroups.com
> <mailto:IBObjects%40yahoogroups.com>] On Behalf
> Of ben.malings@... <mailto:ben.malings%40gmail.com>
> Sent: Tuesday, August 27, 2013 3:27 PM
> To: IBObjects@yahoogroups.com <mailto:IBObjects%40yahoogroups.com>
> Subject: [IBO] IBO 5.2.0.7: FieldsCharCase not working for Proper or
> Normal
> case
>
> I've found that only UPPER and LOWER seem to work with the FieldCharCase
> property of a TIB_Query. I've fixed this locally by making the
> following change to TIB_ColumnVarText.GetValue: case
> CharCase of ccUpper: Result := iboUpperCase(
> Result ); ccLower: Result := iboLowerCase(
> Result ); { PATCH START }
> ccProper:
> begin
> tmpStr :=
> iboLowerCase( Result );
> if iboLength( tmpStr
> ) > 0 then begin
> Result :=
> iboUpperCase(tmpStr[1]);
> for i :=
> 2 to iboLength( tmpStr ) do
> &nbs
> p; Result := Result + ConvCharCase( tmpStr[i-1],
> &nbs
> p; &n
> bsp;
> tmpStr[i],
> &nbs
> p; &n
> bsp;
> ccProperCase );
> end;
> end;
> { PATCH END } This was adapted from code I
> found in TIB_CustomLabel.DoDrawText and seems to work for Proper case; I
> guess something similar would be needed for Normal case.
>
> ------------------------------------
>
> __________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> __________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
> papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>



[Non-text portions of this message have been removed]