[pharo8-api-change] newTextEditor

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

[pharo8-api-change] newTextEditor

HilaireFernandes
Hi,

RubPluggableTextMorph replaced the old PluggableTextMorph.

acceptOnCR: and changedAction: are not valid any more. For the former
never mind.

For the latter how should it be rewritten?

I read these

self textArea announcer when: RubTextChanged send:
#whenTextChangedInTextArea: to: self.

and

whenTextChangedInTextArea: anAnnouncement
    self announcer announce: anAnnouncement

It looks like we have both the old and new word of changes propagation.
I am wondering how to propagate it in DrGeo (pre-Announcement era)

Thanks


newDescriptionMorph
    ^(self
        newTextEditorFor: self
        getText: #description
        setText: #description:
        getEnabled: nil)
        acceptOnCR: false;
        setBalloonText: 'A description of the script. To help the user,
describe carefully what the script does and the input arguments to
select to use it.' translated;
        changedAction: [:text | self changed: #isValid ];
        selectAll

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: [pharo8-api-change] newTextEditor

HilaireFernandes
*Question.*

In RubPluggableTextMorph why the access to the announcer instance is
different in this two methods (quoted message of mine below)

*self textArea announcer* ... and in the other place *self announcer* ...

From my understanding the former is the announcer attached as a property
of the text area morph and the later the announcer attached to the
RubPluggableTextMorph.

Am I missing something?

Hilaire

Le 29/02/2020 à 20:00, Hilaire a écrit :

> For the latter how should it be rewritten?
>
> I read these
>
> self textArea announcer when: RubTextChanged send:
> #whenTextChangedInTextArea: to: self.
>
> and
>
> whenTextChangedInTextArea: anAnnouncement
>     self announcer announce: anAnnouncement

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: [pharo8-api-change] newTextEditor

HilaireFernandes
Ok, never mind I figure out.

Announcement framework is neat.

They were a couple of errors with the Rub** related to the change of
#contents to #text message, which is more meaningful.

Le 01/03/2020 à 11:44, Hilaire a écrit :
> *Question.*
>
> In RubPluggableTextMorph why the access to the announcer instance is
> different in this two methods (quoted message of mine below)
>
> Am I missing something?

--
Dr. Geo
http://drgeo.eu