Type-Ahead Combo

Mischa mischa at omnislab.com
Thu Mar 19 07:37:14 EDT 2015

Hi Mats,

thanks a lot!
In $validate, why do you discard the event when iv_TEXT='' ?
The problem with it is, that you cannot leave the field, click behind or close the window as long as you did not enter anything.
It does not seem to be vital for the functionality(?)

Ah yes - the correct line for detecting a leading occurrence would be
Do iSourceList.$filter(upp(pContents)=left(upp(iSourceList.c1),len(pContents)),kTrue)     ;; leading occurrence
(the one I mentioned in my previous post did not work)

Many thanks

  T H E   O M N I S   L /\ B     www.omnislab.com

-----Ursprüngliche Nachricht-----
Von: omnisdev-en-bounces at lists.omnis-dev.com [mailto:omnisdev-en-bounces at lists.omnis-dev.com] Im Auftrag von ADJob
Gesendet: Mittwoch, 18. März 2015 20:08
An: omnisdev-en at lists.omnis-dev.com
Betreff: Re: Type-Ahead Combo

Hi Mischa,

> On windows, it displays the system classes, regardless which key is entered
> - is this on purpose?

Yes. System classes is loaded in $construct as iv_LIST_SOURCE as demo. Load whatever you want.

> Ok, now I understand - the demo searches for *any* occurrence of the entered
> string within the list strings:

Yes. If the list is a combination of codes and text, you can search both code (normally in the beginning) text  (normally ”any” occurrence) to load the code.

> So to fill the list with strings *starting* with the entered values you
> would need to do something like
>  Do
> iv_LIST_SOURCE.$filter(left(upp(pv_CONTENTS),upp(iv_LIST_SOURCE.c1))>0,kTrue
> )

It might be very useful sometimes.

> One little problem I encounter is that clicking the down button does not
> display the full list.

Fixed if you download again:


Note that this combo also is useful within complex grids. You do not have to play with lists within lists.

Manage your list subscriptions at http://lists.omnis-dev.com

More information about the omnisdev-en mailing list