Questions about TextMorph

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

Questions about TextMorph

Fernando olivero
I building a new TextMorph, in the context of porting Cuis Editors.

I'm having problems understanding some behavior of TexMorph,

1. Whats the purpose of predecessor and successor in TextMorph?

2. Why does the paragraph needs to be lazily initialized.

Im my implementation of TextMorph i have neither and i don't see a good reason to add them.

Fernando
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Questions about TextMorph

Stéphane Ducasse
>
> I building a new TextMorph, in the context of porting Cuis Editors.
>
> I'm having problems understanding some behavior of TexMorph,
>
> 1. Whats the purpose of predecessor and successor in TextMorph?

is it not to bind to the next one and get the text flow as in the cool squeak demo.

> 2. Why does the paragraph needs to be lazily initialized.
>
> Im my implementation of TextMorph i have neither and i don't see a good reason to add them.
>
> Fernando

Fernando I would suggest to publish the code and that we see.
With Morph I have the impression that a lot have to be reconsidered.

Stef
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Questions about TextMorph

Fernando olivero

On Mar 14, 2010, at 8:41 PM, Stéphane Ducasse wrote:

>>
>> I building a new TextMorph, in the context of porting Cuis Editors.
>>
>> I'm having problems understanding some behavior of TexMorph,
>>
>> 1. Whats the purpose of predecessor and successor in TextMorph?
>
> is it not to bind to the next one and get the text flow as in the cool squeak demo.

where can is see this demo? , i think that having pred and suc made the code more complicated.

>
>> 2. Why does the paragraph needs to be lazily initialized.
>>
>> Im my implementation of TextMorph i have neither and i don't see a good reason to add them.
>>
>> Fernando
>
> Fernando I would suggest to publish the code and that we see.
> With Morph I have the impression that a lot have to be reconsidered.

I cleanup a lot of stuff out of TextMorph, into NewTextMorph.

>
> Stef

Yes,  during this Pharo Sprint we worked on a  EntryFieldMorph, NewTextMorph and CodeMorph, that respectivly use SimpleEditor, TextEditor and SmalltalkEditor ( from CUIS).

I'll make a couple of tests tomorrow and publish the SLICE.

Fernando




> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Questions about TextMorph

Stéphane Ducasse
take squeak 3.5

Stef

>
>>
>> Stef
>
> Yes,  during this Pharo Sprint we worked on a  EntryFieldMorph, NewTextMorph and CodeMorph, that respectivly use SimpleEditor, TextEditor and SmalltalkEditor ( from CUIS).
>
> I'll make a couple of tests tomorrow and publish the SLICE.
EXCELLENT and THANKS for the clipboard check!!!!

You see commit often commit simple but commit a LOT :)
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

NewTextMorph status

Fernando olivero
Now we have in Pharo the following:

Morph | Editor
------------------------------------------------------------------
EntryFieldMorph | SimpleEditor
NewTextMorph | TextEditor
MethodMorph | SmalltalkEditor
ClassDefinitionMorph | SmalltalkEditor
 
NewTextMorph is a cleanup version based on TextMorph, that is still missing some functionality.
MethodMorph and ClassDefinitonMorph are NewTextMorph for specifically viewing and editing methods and classes.

I did  a couple of tests also, and examples.

TODO: menu support (easily done), OB and Glamour integration( high complexity?), OCompletion(fairly easy, i will work with romain on this).


Stef, should i use the lastest 1.1 image  as the base for preparing the SLICE?



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

editors.tiff (296K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NewTextMorph status

Stéphane Ducasse

On Mar 15, 2010, at 11:21 AM, Fernando olivero wrote:

> Now we have in Pharo the following:
>
> Morph | Editor
> ------------------------------------------------------------------
> EntryFieldMorph | SimpleEditor
> NewTextMorph | TextEditor
> MethodMorph | SmalltalkEditor
> ClassDefinitionMorph | SmalltalkEditor
>
> NewTextMorph is a cleanup version based on TextMorph, that is still missing some functionality.
> MethodMorph and ClassDefinitonMorph are NewTextMorph for specifically viewing and editing methods and classes.
>
> I did  a couple of tests also, and examples.
>
> TODO: menu support (easily done), OB and Glamour integration( high complexity?), OCompletion(fairly easy, i will work with romain on this).
>
>
> Stef, should i use the lastest 1.1 image  as the base for preparing the SLICE?

please
Now Fernando when you are talking about
        MethodMorph
        and ClassDefinitionMorph this is for your ide?
So may be you should keep that for you?
Or/and are you saying that we should have a new SmalltalkCodeMorph that has a SmalltalkEditor?

Stef
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: NewTextMorph status

Fernando olivero
On Mar 16, 2010, at 3:24 PM, Stéphane Ducasse wrote:




Stef, should i use the lastest 1.1 image  as the base for preparing the SLICE?

please

I''l prepare the SLICE tonight.


Now Fernando when you are talking about
MethodMorph
and ClassDefinitionMorph this is for your ide?
So may be you should keep that for you?
Or/and are you saying that we should have a new SmalltalkCodeMorph that has a SmalltalkEditor?

Stef


I noticed that spreading the behavior to each editor, makes the  code much cleaner and provides  better support for maintenance and extensions.
Also i'm using announcements, for announcing acceptedContents and escape pressed.

This would allow us to unify the TextMorph and PluggableTextMorph, that currently (in my opinion) is  mess of shared behavior and subclasification.



pd:

Examples of usage:

t := NewTextMorph new.
t text:'hola que tal como andas?. Tenemos dos lineas ahora.Y que tal tres?' asText .
t onAcceptSend: #delete to: t.

m := MethodMorph new.
m class: Object selector:#name.
m font: ( LogicalFont
familyName: 'DejaVu Serif' 
pointSize: 15 ) copy.

m := ClassDefinitionMorph  new.
m class: Object.

e := EntryFieldMorph example1.
e onAcceptSend: #hello to: e.
e onEscapeSend: #delete to: e. 


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project