Subject Re: [IBO] errors with TIB_LookupCombo
Author Ryan Nilsson-Harding
Hi Geoff,

I'm not sure this is the problem though.
I'm not particularly bothered by what the sort order is of the combo.
My problem is that when the combo displays a certain item, the user
will expect that item to remain there when they move off that
control. But in a few cases this does not happen

Whats happening is the combo displays the correct item UNTIL they
tab off, at which point the combo changes it's item to another one.

I have the same problem with the item 'PO55IE'.
It appears to be an inconsistency with the combo control, in that it
indicates one thing, but then does another after the user tabs out
of the control.

Am I making any sense?

I have a basic app which indicates this if you're interested


--- In IBObjects@y..., Geoff Worboys <geoff@t...> wrote:
> > ie
> > For the item '7812', if 781 was typed in, the combo correctly
> > displayed 7812, and maintained that when tabbed out of. But if
> > whole 7812 was typed in, it would be visible in the combo UNTIL
> > tabbed out of, at which point the combo changes the item in the
> > combo to the item above. (in this case 78-284)
> > Any ideas, anyone?
> Its a character set issue. IBO gets is data from IB/FB which sorts
> according to the character set and collation defined there.
> has its own character-set/collation which often has a different
> order. Hyphens are one of those characters than often trip the
> difference.
> eg: My Windows sorts the following as shown:
> 7777
> 7811
> 78-11
> 78-21
> 7999
> The same listed sorted in a charset none database comes out as:
> 7777
> 78-11
> 78-21
> 7811
> 7999
> You must assign code to the TIB_Connection.OnCustomCompareStr and
> OnCustomCompareText functions. For example, if you dataset is
> using a character of none (equivalent to ASCII) then you can
> simply embed code that uses the VCL CompareStr and CompareText
> functions (IBO uses the AnsiCompareStr and AnsiCompareText
> by default).
> hth
> --
> Geoff Worboys
> Telesis Computing