Morphic text filed plus autocompetion

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Morphic text filed plus autocompetion

NorbertHartl
I like to make myself a little command shell inside the image. For this I would need a textfield that can popup somewhere on the screen and that has enough hooks for text entry events and hooks/support for auto-completion.

What would be the best things to read/the best code to look at in order to learn how I can accomplish that.

thanks,

Norbert


Reply | Threaded
Open this post in threaded view
|

Re: Morphic text filed plus autocompetion

Benjamin Van Ryseghem (Pharo)
You may have a look at the Spotlight widget Esteban made.
It's mainly a text area with auto completion

Ben

On Sep 30, 2013, at 2:18 PM, Norbert Hartl <[hidden email]> wrote:

I like to make myself a little command shell inside the image. For this I would need a textfield that can popup somewhere on the screen and that has enough hooks for text entry events and hooks/support for auto-completion.

What would be the best things to read/the best code to look at in order to learn how I can accomplish that.

thanks,

Norbert



Reply | Threaded
Open this post in threaded view
|

Re: Morphic text filed plus autocompetion

NorbertHartl

Am 30.09.2013 um 15:06 schrieb Benjamin <[hidden email]>:

You may have a look at the Spotlight widget Esteban made.
It's mainly a text area with auto completion

Thanks. From what I know from Spotlight it is close to the perfect exampe. I just didn't think of it myself.

Norbert

Ben

On Sep 30, 2013, at 2:18 PM, Norbert Hartl <[hidden email]> wrote:

I like to make myself a little command shell inside the image. For this I would need a textfield that can popup somewhere on the screen and that has enough hooks for text entry events and hooks/support for auto-completion.

What would be the best things to read/the best code to look at in order to learn how I can accomplish that.

thanks,

Norbert




Reply | Threaded
Open this post in threaded view
|

Re: Morphic text filed plus autocompetion

philippeback
In reply to this post by NorbertHartl
Spotlight?



On Monday, September 30, 2013, Norbert Hartl <[hidden email]> wrote:
> I like to make myself a little command shell inside the image. For this I would need a textfield that can popup somewhere on the screen and that has enough hooks for text entry events and hooks/support for auto-completion.
>
> What would be the best things to read/the best code to look at in order to learn how I can accomplish that.
>
> thanks,
>
> Norbert
>
>
>
>

--
---
Philippe Back
Dramatic Performance Improvements
Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
Blog: http://philippeback.be | Twitter: @philippeback

High Octane SPRL
rue cour Boisacq 101 | 1301 Bierges | Belgium

Pharo Consortium Member - http://consortium.pharo.org/
Featured on the Software Process and Measurement Cast - http://spamcast.libsyn.com
Sparx Systems Enterprise Architect and Ability Engineering EADocX Value Added Reseller
 


Reply | Threaded
Open this post in threaded view
|

Re: Morphic text filed plus autocompetion

Camillo Bruni-3
The thing you get in pharo when you press SHIFT+ENTER :)

On 2013-09-30, at 10:29, "[hidden email]" <[hidden email]> wrote:

> Spotlight?
>
>
>
> On Monday, September 30, 2013, Norbert Hartl <[hidden email]> wrote:
>> I like to make myself a little command shell inside the image. For this I
> would need a textfield that can popup somewhere on the screen and that has
> enough hooks for text entry events and hooks/support for auto-completion.
>>
>> What would be the best things to read/the best code to look at in order
> to learn how I can accomplish that.
>>
>> thanks,
>>
>> Norbert
>>
>>
>>
>>
>
> --
> ---
> Philippe Back
> Dramatic Performance Improvements
> Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
> Mail:[hidden email] | Web: http://philippeback.eu
> Blog: http://philippeback.be | Twitter: @philippeback
> Youtube: http://www.youtube.com/user/philippeback/videos
>
> High Octane SPRL
> rue cour Boisacq 101 | 1301 Bierges | Belgium
>
> Pharo Consortium Member - http://consortium.pharo.org/
> Featured on the Software Process and Measurement Cast -
> http://spamcast.libsyn.com
> Sparx Systems Enterprise Architect and Ability Engineering EADocX Value
> Added Reseller


signature.asc (457 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Morphic text filed plus autocompetion

NorbertHartl

Am 30.09.2013 um 15:48 schrieb Camillo Bruni <[hidden email]>:

> The thing you get in pharo when you press SHIFT+ENTER :)
>
Thanks cami! Although it might sound embarrassing I was indeed googling for it to find a video by James Robertson where I get the shift+enter hint :)

Norbert

> On 2013-09-30, at 10:29, "[hidden email]" <[hidden email]> wrote:
>
>> Spotlight?
>>
>>
>>
>> On Monday, September 30, 2013, Norbert Hartl <[hidden email]> wrote:
>>> I like to make myself a little command shell inside the image. For this I
>> would need a textfield that can popup somewhere on the screen and that has
>> enough hooks for text entry events and hooks/support for auto-completion.
>>>
>>> What would be the best things to read/the best code to look at in order
>> to learn how I can accomplish that.
>>>
>>> thanks,
>>>
>>> Norbert
>>>
>>>
>>>
>>>
>>
>> --
>> ---
>> Philippe Back
>> Dramatic Performance Improvements
>> Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
>> Mail:[hidden email] | Web: http://philippeback.eu
>> Blog: http://philippeback.be | Twitter: @philippeback
>> Youtube: http://www.youtube.com/user/philippeback/videos
>>
>> High Octane SPRL
>> rue cour Boisacq 101 | 1301 Bierges | Belgium
>>
>> Pharo Consortium Member - http://consortium.pharo.org/
>> Featured on the Software Process and Measurement Cast -
>> http://spamcast.libsyn.com
>> Sparx Systems Enterprise Architect and Ability Engineering EADocX Value
>> Added Reseller
>


Reply | Threaded
Open this post in threaded view
|

Re: Morphic text filed plus autocompetion

Camillo Bruni-3
On 2013-09-30, at 10:53, Norbert Hartl <[hidden email]> wrote:
> Am 30.09.2013 um 15:48 schrieb Camillo Bruni <[hidden email]>:
>> The thing you get in pharo when you press SHIFT+ENTER :)
>>
> Thanks cami! Although it might sound embarrassing I was indeed googling for it to find a video by James Robertson where I get the shift+enter hint :)

I didn't know the shortcut for a long time either :P, good to know that you start finding answers about pharo on google these days!

signature.asc (457 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Morphic text filed plus autocompetion

Sven Van Caekenberghe-2
In reply to this post by NorbertHartl

On 30 Sep 2013, at 15:53, Norbert Hartl <[hidden email]> wrote:

>
> Am 30.09.2013 um 15:48 schrieb Camillo Bruni <[hidden email]>:
>
>> The thing you get in pharo when you press SHIFT+ENTER :)
>>
> Thanks cami! Although it might sound embarrassing I was indeed googling for it to find a video by James Robertson where I get the shift+enter hint :)

Argh, and it is such an important feature !

Never open a browser to invoke find class, never type a class name somewhere to browse...

> Norbert
>
>> On 2013-09-30, at 10:29, "[hidden email]" <[hidden email]> wrote:
>>
>>> Spotlight?
>>>
>>>
>>>
>>> On Monday, September 30, 2013, Norbert Hartl <[hidden email]> wrote:
>>>> I like to make myself a little command shell inside the image. For this I
>>> would need a textfield that can popup somewhere on the screen and that has
>>> enough hooks for text entry events and hooks/support for auto-completion.
>>>>
>>>> What would be the best things to read/the best code to look at in order
>>> to learn how I can accomplish that.
>>>>
>>>> thanks,
>>>>
>>>> Norbert
>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> ---
>>> Philippe Back
>>> Dramatic Performance Improvements
>>> Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
>>> Mail:[hidden email] | Web: http://philippeback.eu
>>> Blog: http://philippeback.be | Twitter: @philippeback
>>> Youtube: http://www.youtube.com/user/philippeback/videos
>>>
>>> High Octane SPRL
>>> rue cour Boisacq 101 | 1301 Bierges | Belgium
>>>
>>> Pharo Consortium Member - http://consortium.pharo.org/
>>> Featured on the Software Process and Measurement Cast -
>>> http://spamcast.libsyn.com
>>> Sparx Systems Enterprise Architect and Ability Engineering EADocX Value
>>> Added Reseller
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Morphic text filed plus autocompetion

NorbertHartl


Am 30.09.2013 um 16:29 schrieb Sven Van Caekenberghe <[hidden email]>:

>
> On 30 Sep 2013, at 15:53, Norbert Hartl <[hidden email]> wrote:
>
>>
>> Am 30.09.2013 um 15:48 schrieb Camillo Bruni <[hidden email]>:
>>
>>> The thing you get in pharo when you press SHIFT+ENTER :)
>> Thanks cami! Although it might sound embarrassing I was indeed googling for it to find a video by James Robertson where I get the shift+enter hint :)
>
> Argh, and it is such an important feature !
>
> Never open a browser to invoke find class, never type a class name somewhere to browse...
>
Sometimes it is hard to tell if you are being serious!

Norbert

>> Norbert
>>
>>> On 2013-09-30, at 10:29, "[hidden email]" <[hidden email]> wrote:
>>>
>>>> Spotlight?
>>>>
>>>>
>>>>
>>>> On Monday, September 30, 2013, Norbert Hartl <[hidden email]> wrote:
>>>>> I like to make myself a little command shell inside the image. For this I
>>>> would need a textfield that can popup somewhere on the screen and that has
>>>> enough hooks for text entry events and hooks/support for auto-completion.
>>>>>
>>>>> What would be the best things to read/the best code to look at in order
>>>> to learn how I can accomplish that.
>>>>>
>>>>> thanks,
>>>>>
>>>>> Norbert
>>>>
>>>> --
>>>> ---
>>>> Philippe Back
>>>> Dramatic Performance Improvements
>>>> Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
>>>> Mail:[hidden email] | Web: http://philippeback.eu
>>>> Blog: http://philippeback.be | Twitter: @philippeback
>>>> Youtube: http://www.youtube.com/user/philippeback/videos
>>>>
>>>> High Octane SPRL
>>>> rue cour Boisacq 101 | 1301 Bierges | Belgium
>>>>
>>>> Pharo Consortium Member - http://consortium.pharo.org/
>>>> Featured on the Software Process and Measurement Cast -
>>>> http://spamcast.libsyn.com
>>>> Sparx Systems Enterprise Architect and Ability Engineering EADocX Value
>>>> Added Reseller
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Morphic text filed plus autocompetion

Sven Van Caekenberghe-2

On 30 Sep 2013, at 18:11, Norbert Hartl <[hidden email]> wrote:

>
>
> Am 30.09.2013 um 16:29 schrieb Sven Van Caekenberghe <[hidden email]>:
>
>>
>> On 30 Sep 2013, at 15:53, Norbert Hartl <[hidden email]> wrote:
>>
>>>
>>> Am 30.09.2013 um 15:48 schrieb Camillo Bruni <[hidden email]>:
>>>
>>>> The thing you get in pharo when you press SHIFT+ENTER :)
>>> Thanks cami! Although it might sound embarrassing I was indeed googling for it to find a video by James Robertson where I get the shift+enter hint :)
>>
>> Argh, and it is such an important feature !
>>
>> Never open a browser to invoke find class, never type a class name somewhere to browse...
>>
> Sometimes it is hard to tell if you are being serious!

Same goes for you ;-)  Age ?

But I am serious: once you get used to using SHIFT+ENTER, you will never open a browser to invoke find class, never type a class name somewhere to browse, _every again_. And you won't understand how you ever could live without it.

> Norbert
>
>>> Norbert
>>>
>>>> On 2013-09-30, at 10:29, "[hidden email]" <[hidden email]> wrote:
>>>>
>>>>> Spotlight?
>>>>>
>>>>>
>>>>>
>>>>> On Monday, September 30, 2013, Norbert Hartl <[hidden email]> wrote:
>>>>>> I like to make myself a little command shell inside the image. For this I
>>>>> would need a textfield that can popup somewhere on the screen and that has
>>>>> enough hooks for text entry events and hooks/support for auto-completion.
>>>>>>
>>>>>> What would be the best things to read/the best code to look at in order
>>>>> to learn how I can accomplish that.
>>>>>>
>>>>>> thanks,
>>>>>>
>>>>>> Norbert
>>>>>
>>>>> --
>>>>> ---
>>>>> Philippe Back
>>>>> Dramatic Performance Improvements
>>>>> Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
>>>>> Mail:[hidden email] | Web: http://philippeback.eu
>>>>> Blog: http://philippeback.be | Twitter: @philippeback
>>>>> Youtube: http://www.youtube.com/user/philippeback/videos
>>>>>
>>>>> High Octane SPRL
>>>>> rue cour Boisacq 101 | 1301 Bierges | Belgium
>>>>>
>>>>> Pharo Consortium Member - http://consortium.pharo.org/
>>>>> Featured on the Software Process and Measurement Cast -
>>>>> http://spamcast.libsyn.com
>>>>> Sparx Systems Enterprise Architect and Ability Engineering EADocX Value
>>>>> Added Reseller
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: Morphic text filed plus autocompetion

philippeback
In reply to this post by Camillo Bruni-3
Yeah, I was suggesting he had a look at Spotlight... I know what this one is ;-)
Reply | Threaded
Open this post in threaded view
|

Re: Morphic text filed plus autocompetion

EstebanLM
In reply to this post by Sven Van Caekenberghe-2

On Sep 30, 2013, at 6:26 PM, Sven Van Caekenberghe <[hidden email]> wrote:

>
> On 30 Sep 2013, at 18:11, Norbert Hartl <[hidden email]> wrote:
>
>>
>>
>> Am 30.09.2013 um 16:29 schrieb Sven Van Caekenberghe <[hidden email]>:
>>
>>>
>>> On 30 Sep 2013, at 15:53, Norbert Hartl <[hidden email]> wrote:
>>>
>>>>
>>>> Am 30.09.2013 um 15:48 schrieb Camillo Bruni <[hidden email]>:
>>>>
>>>>> The thing you get in pharo when you press SHIFT+ENTER :)
>>>> Thanks cami! Although it might sound embarrassing I was indeed googling for it to find a video by James Robertson where I get the shift+enter hint :)
>>>
>>> Argh, and it is such an important feature !
>>>
>>> Never open a browser to invoke find class, never type a class name somewhere to browse...
>>>
>> Sometimes it is hard to tell if you are being serious!
>
> Same goes for you ;-)  Age ?
>
> But I am serious: once you get used to using SHIFT+ENTER, you will never open a browser to invoke find class, never type a class name somewhere to browse, _every again_. And you won't understand how you ever could live without it.

:)

... and the Spotlight2 we are preparing for Pharo3 is even better ;)

>
>> Norbert
>>
>>>> Norbert
>>>>
>>>>> On 2013-09-30, at 10:29, "[hidden email]" <[hidden email]> wrote:
>>>>>
>>>>>> Spotlight?
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Monday, September 30, 2013, Norbert Hartl <[hidden email]> wrote:
>>>>>>> I like to make myself a little command shell inside the image. For this I
>>>>>> would need a textfield that can popup somewhere on the screen and that has
>>>>>> enough hooks for text entry events and hooks/support for auto-completion.
>>>>>>>
>>>>>>> What would be the best things to read/the best code to look at in order
>>>>>> to learn how I can accomplish that.
>>>>>>>
>>>>>>> thanks,
>>>>>>>
>>>>>>> Norbert
>>>>>>
>>>>>> --
>>>>>> ---
>>>>>> Philippe Back
>>>>>> Dramatic Performance Improvements
>>>>>> Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
>>>>>> Mail:[hidden email] | Web: http://philippeback.eu
>>>>>> Blog: http://philippeback.be | Twitter: @philippeback
>>>>>> Youtube: http://www.youtube.com/user/philippeback/videos
>>>>>>
>>>>>> High Octane SPRL
>>>>>> rue cour Boisacq 101 | 1301 Bierges | Belgium
>>>>>>
>>>>>> Pharo Consortium Member - http://consortium.pharo.org/
>>>>>> Featured on the Software Process and Measurement Cast -
>>>>>> http://spamcast.libsyn.com
>>>>>> Sparx Systems Enterprise Architect and Ability Engineering EADocX Value
>>>>>> Added Reseller
>>>
>>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Morphic text filed plus autocompetion

NorbertHartl
In reply to this post by Sven Van Caekenberghe-2


Am 30.09.2013 um 18:26 schrieb Sven Van Caekenberghe <[hidden email]>:

>
> On 30 Sep 2013, at 18:11, Norbert Hartl <[hidden email]> wrote:
>
>>
>>
>> Am 30.09.2013 um 16:29 schrieb Sven Van Caekenberghe <[hidden email]>:
>>
>>>
>>> On 30 Sep 2013, at 15:53, Norbert Hartl <[hidden email]> wrote:
>>>
>>>>
>>>> Am 30.09.2013 um 15:48 schrieb Camillo Bruni <[hidden email]>:
>>>>
>>>>> The thing you get in pharo when you press SHIFT+ENTER :)
>>>> Thanks cami! Although it might sound embarrassing I was indeed googling for it to find a video by James Robertson where I get the shift+enter hint :)
>>>
>>> Argh, and it is such an important feature !
>>>
>>> Never open a browser to invoke find class, never type a class name somewhere to browse...
>> Sometimes it is hard to tell if you are being serious!
>
> Same goes for you ;-)  Age ?
>
Most likely :)

> But I am serious: once you get used to using SHIFT+ENTER, you will never open a browser to invoke find class, never type a class name somewhere to browse, _every again_. And you won't understand how you ever could live without it.
>
Ah you mean this "dish washer" kind of thing? Ok I'll try! I'm not sure I'm able to adapt. I'm using vi for over 20 years and probably know 8 things to do with it. So let's see

Norbert

>> Norbert
>>
>>>> Norbert
>>>>
>>>>> On 2013-09-30, at 10:29, "[hidden email]" <[hidden email]> wrote:
>>>>>
>>>>>> Spotlight?
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Monday, September 30, 2013, Norbert Hartl <[hidden email]> wrote:
>>>>>>> I like to make myself a little command shell inside the image. For this I
>>>>>> would need a textfield that can popup somewhere on the screen and that has
>>>>>> enough hooks for text entry events and hooks/support for auto-completion.
>>>>>>>
>>>>>>> What would be the best things to read/the best code to look at in order
>>>>>> to learn how I can accomplish that.
>>>>>>>
>>>>>>> thanks,
>>>>>>>
>>>>>>> Norbert
>>>>>>
>>>>>> --
>>>>>> ---
>>>>>> Philippe Back
>>>>>> Dramatic Performance Improvements
>>>>>> Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
>>>>>> Mail:[hidden email] | Web: http://philippeback.eu
>>>>>> Blog: http://philippeback.be | Twitter: @philippeback
>>>>>> Youtube: http://www.youtube.com/user/philippeback/videos
>>>>>>
>>>>>> High Octane SPRL
>>>>>> rue cour Boisacq 101 | 1301 Bierges | Belgium
>>>>>>
>>>>>> Pharo Consortium Member - http://consortium.pharo.org/
>>>>>> Featured on the Software Process and Measurement Cast -
>>>>>> http://spamcast.libsyn.com
>>>>>> Sparx Systems Enterprise Architect and Ability Engineering EADocX Value
>>>>>> Added Reseller
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Morphic text filed plus autocompetion

Alain Plantec-3
In reply to this post by Benjamin Van Ryseghem (Pharo)
Hi all,
also notice that the default text entry widget has already an autocompletion feature.
see WidgetExamples>>exampleTextEntryWithCompletionDialog
You can find several uses of it. See EditorFindReplaceDialogWindow>>newFindTextEntryMorph as another example.
Cheers
Alain


-----
exampleTextEntryWithCompletionDialog
        "self new exampleTextEntryWithCompletionDialog"
        | applicants entryCompletion |
        applicants := (Array
                                streamContents: [:strm | Symbol
                                                allSymbolTablesDo: [:each | (each notEmpty
                                                                        and: [each first canBeGlobalVarInitial
                                                                                        and: [Smalltalk globals includesKey: each]])
                                                                ifTrue: [strm nextPut: each]]]) sort.
        entryCompletion := EntryCompletion new
                                dataSourceBlock: [:currText | applicants];
                               
                                filterBlock: [:currApplicant :currText | currText size > 3
                                                and: [currApplicant asUppercase includesSubstring: currText asString asUppercase]].
        UIManager default
                request: 'Enter a class name fragment (at least 4 characters)'
                initialAnswer: ''
                title: 'Text entry with completion example: simple find a class'
                entryCompletion: entryCompletion
-----

Le 30 sept. 2013 à 15:06, Benjamin <[hidden email]> a écrit :

> You may have a look at the Spotlight widget Esteban made.
> It's mainly a text area with auto completion
>
> Ben
>
> On Sep 30, 2013, at 2:18 PM, Norbert Hartl <[hidden email]> wrote:
>
>> I like to make myself a little command shell inside the image. For this I would need a textfield that can popup somewhere on the screen and that has enough hooks for text entry events and hooks/support for auto-completion.
>>
>> What would be the best things to read/the best code to look at in order to learn how I can accomplish that.
>>
>> thanks,
>>
>> Norbert
>>
>>
>