Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: Enrico S. on March 31, 2020, 09:50:39 am



Title: Completer enhancement proposal
Post by: Enrico S. on March 31, 2020, 09:50:39 am
Hi.
Actually the COMPLETER is activated when the ON CHANGE trigger is fired for the field.
If I would automatically expose a short list when the focus goes on that field (if empty, obviously), i would need to activate the completer with BEFORE FIELD, and that is not actually provided.

So, what do you think about the activation of completer with both ON CHANGE and BEFORE FIELD triggers ?

Best regards.
Enrico


Title: Re: Completer enhancement proposal
Post by: Reuben B. on April 01, 2020, 04:16:14 am
Interesting question.  With other widgets...

BUTTONEDIT you can code inside BEFORE FIELD to execute the action in certain conditions i.e. field is blank, to save the user having to tap the action
COMBOBOX, drop-down list appears if you click in field, it does not appear if you tab into field.
If you were replacing BUTTONEDIT with INPUT+COMPLETER, you would probably expect to maintain that functionality.

The ON CHANGE block is only executed if there is no keyboard entry for a few hundred milliseconds.  BEFORE FIELD would have to have the same, so that if the user tab-tab through the field quickly, the block was not fired.  Only if the user paused in the field would you want it fired.

I don't think you should have to repeat the ON CHANGE logic in BEFORE FIELD.  If this were to occur, I think an additional attribute that would lead to ON CHANGE being field on field entry would lead to cleaner code.

With COMPLETER expectation is that list will have a narrower selection, the more keys you type.  Type, G, get the top 20 entries that begin G, type GE, get the top 20 entries that begin GE.  So what criteria would you use when the field is empty?  I guess you would use top 20 most popular values, or the 20 most recent values.

Does this pattern occur in any other well-known applications?  Answer=Yes.  Goto google, click into the search field, and it pops up with your most recent searches.


Reuben


Title: Re: Completer enhancement proposal
Post by: Enrico S. on April 01, 2020, 09:09:45 am
Hi, Reuben.
I agree with you: no need to repeat the ON CHANGE logic in BEFORE FIELD.

I normally use COMPLETERS under some controls:
- if the cursor position in greater than 1 (IF fgl_dialog_getcursor() > 1) I create the list, otherwise i destroy it. By this way using backspace on the completer field the list disappear as the user completely rewind the field.
- if the user first type just a spacebar on the completer field, I produce a short list with the preferred criteria.

I figured an enhancement of COMPLETER to speed-up presentation of choices on cascade completers fields, mainly inside an INPUT ARRAY, where you cannot use cascade comboboxes.

COMPLETER are very very appreciated, and I think they could be better with some little enhancement.
Reuben, you point of view is wider then mine, so I'm sure you can figure how to make it better.

Thanks for your answer.
Enrico