Text Field With Entry Completion Via Tab
With all the new tools - Spec, Brick, Tx, etc - what is the easiest way to do this in Pharo 4.0? I don't have a preference for the tool as long is it works in Morphic. My naive attempt failed: applicants := PaPerson list collect: #name. entryCompletion := EntryCompletion new dataSourceBlock: [ :currText | applicants ]; filterBlock: [ :currApplicant :currText | currApplicant asUppercase includesSubstring: currText asString asUppercase ]. TextInputFieldModel new acceptOnCR: false; entryCompletion: entryCompletion; openWithSpec. The completion menu appears, but is seems you can only accept the selected completion via the mouse - yuck! Thanks. ----- Cheers, Sean -- View this message in context: http://forum.world.st/Text-Field-With-Entry-Completion-Via-Tab-tp4853993.htm... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
2015-10-06 15:56 GMT+02:00 Sean P. DeNigris <sean@clipperadams.com>:
With all the new tools - Spec, Brick, Tx, etc - what is the easiest way to do this in Pharo 4.0? I don't have a preference for the tool as long is it works in Morphic.
My naive attempt failed:
applicants := PaPerson list collect: #name. entryCompletion := EntryCompletion new dataSourceBlock: [ :currText | applicants ]; filterBlock: [ :currApplicant :currText | currApplicant asUppercase includesSubstring: currText asString asUppercase ]. TextInputFieldModel new acceptOnCR: false; entryCompletion: entryCompletion; openWithSpec.
The completion menu appears, but is seems you can only accept the selected completion via the mouse - yuck!
you can select an entry with arrow up/down and the enter key should accept the selected completion entry.
Thanks.
----- Cheers, Sean -- View this message in context: http://forum.world.st/Text-Field-With-Entry-Completion-Via-Tab-tp4853993.htm... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Nicolai Hess wrote
you can select an entry with arrow up/down and the enter key should accept the selected completion entry.
Ah, yes I see that now. I wanted tab completion, but it's not worth the effort. I did a spike and it required a handful of subclasses. Enter will do for now. ----- Cheers, Sean -- View this message in context: http://forum.world.st/Text-Field-With-Entry-Completion-Via-Tab-tp4853993p485... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On Thu, Oct 8, 2015 at 3:14 AM, Sean P. DeNigris <sean@clipperadams.com> wrote:
Nicolai Hess wrote
you can select an entry with arrow up/down and the enter key should accept the selected completion entry.
Ah, yes I see that now. I wanted tab completion, but it's not worth the effort. I did a spike and it required a handful of subclasses. Enter will do for now.
Tab is used to jump between widgets in a window (just like in browser). Unfortunately this is handled in morphic so it would really require to modify the stack (spec + adapter + morphic). On another note: EntryCompletion seems to be Morphic widget... so maybe we should write some equivalent/wrapper for Spec? Peter
participants (3)
-
Nicolai Hess -
Peter Uhnák -
Sean P. DeNigris