Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding entry completion setter to SpRequestDialog #1540

Open
wants to merge 1 commit into
base: Pharo13
Choose a base branch
from

Conversation

adri09070
Copy link
Contributor

This would allow to remove a dependency to UIManager in the StDebugger:

requestProtocolIn: aClass

   | entryCompletion applicants choice |
   self class fastTDD ifTrue: [ ^ Protocol unclassified ].
   applicants := self protocolSuggestionsFor: aClass.
   entryCompletion := EntryCompletion new
   	                   dataSourceBlock: [ :currText | applicants ];
   	                   filterBlock: [ :currApplicant :currText | 
   		                   currText size > 3 and: [ 
   				                   currApplicant asLowercase includesSubstring:
   						                   currText asString asLowercase ] ].

   choice := (UIManager default
   	           request:
   	           'Start typing for suggestions (3 characters minimum)'
   	           initialAnswer: Protocol unclassified
   	           title: 'Choose a protocol'
   	           entryCompletion: entryCompletion) ifNil: [ Abort signal ].

   ^ choice ifEmpty: [ Protocol unclassified ]

Plus, overall, I think this is a good addition to add entry completion in a dialog that asks the user to write text

@Ducasse
Copy link
Contributor

Ducasse commented May 4, 2024

Thanks adrian let us see what esteban will say. @estebanlm

@jecisc jecisc closed this May 16, 2024
@jecisc jecisc reopened this May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants