Replacement for TextDisplayMorph

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

Replacement for TextDisplayMorph

Ralph Boland
I started using squeak with Squeak 3.6 and one of the classes I used was
TextDisplayMorph.  At some point this class disappeared from Squeak so
I just carried it forward.  But now I would like to get rid of it and
use whatever
one is supposed to use instead of a TextDisplayMorph.  The key property
I am looking for is that the user cannot edit the text in the morph.
My best guess as to the replacement for TextDisplayMorph is PluggableTextMorph
but of course it allows the user to edit the text.

What class do I use to replace TextDisplayMorph  and if the answer is
PluggableTextMorph how am I supposed to make the text not editable
by the user?
Alternatively could someone point me to code in Squeak that I could
study to find my answer?


Thanks

Ralph Boland


--
Quantum Theory cannot save us from the tyranny of a deterministic universe
but it does give God something to do

Reply | Threaded
Open this post in threaded view
|

Re: Replacement for TextDisplayMorph

Enrico Schwass-2
Hello

StringMorph or TextMorph might work. Override mouse handling in  
TextMorph  to prevent edits would be my first guess

Hth
Enno



Am 04.06.2010 um 09:32 schrieb Ralph Boland <[hidden email]>:

> I started using squeak with Squeak 3.6 and one of the classes I used  
> was
> TextDisplayMorph.  At some point this class disappeared from Squeak so
> I just carried it forward.  But now I would like to get rid of it and
> use whatever
> one is supposed to use instead of a TextDisplayMorph.  The key  
> property
> I am looking for is that the user cannot edit the text in the morph.
> My best guess as to the replacement for TextDisplayMorph is  
> PluggableTextMorph
> but of course it allows the user to edit the text.
>
> What class do I use to replace TextDisplayMorph  and if the answer is
> PluggableTextMorph how am I supposed to make the text not editable
> by the user?
> Alternatively could someone point me to code in Squeak that I could
> study to find my answer?
>
>
> Thanks
>
> Ralph Boland
>
>
> --
> Quantum Theory cannot save us from the tyranny of a deterministic  
> universe
> but it does give God something to do
>

Reply | Threaded
Open this post in threaded view
|

Re: Replacement for TextDisplayMorph

Bert Freudenberg
In reply to this post by Ralph Boland
On 04.06.2010, at 09:32, Ralph Boland wrote:

> The key property
> I am looking for is that the user cannot edit the text in the morph.
> [...] how am I supposed to make the text not editable
> by the user?

Any morph can be "locked" to make it ignore user input. It's in the halo menu, or send "lock: true".

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: Replacement for TextDisplayMorph

Enrico Schwass-2
Bert Freudenberg <[hidden email]> writes:

>> The key property
>> I am looking for is that the user cannot edit the text in the morph.
>> [...] how am I supposed to make the text not editable
>> by the user?
>
> Any morph can be "locked" to make it ignore user input. It's in the halo menu, or send "lock: true".
>
> - Bert -

This method is from 2006. Never saw that all the years. Every day a new
piece to discover :)

Reply | Threaded
Open this post in threaded view
|

Re: Replacement for TextDisplayMorph

Bert Freudenberg

On 04.06.2010, at 10:47, Enrico Schwass wrote:

> Bert Freudenberg <[hidden email]> writes:
>
>>> The key property
>>> I am looking for is that the user cannot edit the text in the morph.
>>> [...] how am I supposed to make the text not editable
>>> by the user?
>>
>> Any morph can be "locked" to make it ignore user input. It's in the halo menu, or send "lock: true".
>>
>> - Bert -
>
> This method is from 2006. Never saw that all the years. Every day a new
> piece to discover :)

That method has been there forever (*).

- Bert -

(*) 1997