[Pharo-users] Rubric events

Alain Plantec alain.plantec at yahoo.com
Fri Oct 2 02:36:27 EDT 2015


Hello Miguel,
Did you tried to subscribe to RubTextUpdatedInModel through the model of the morph (and not directly the morph) ?
Cheers
Alain


> On 30 Sep 2015, at 16:52, Miguel Campusano <mcampusa at dcc.uchile.cl> wrote:
> 
> Hello,
> I'm working on modifying the styling of text by using RubTextSegmentMorph. The problem is that the text could be modified dynamically by selecting another text, so the styling must be modified.
> I want to use the announcements system of Rubric but something weird happens. When I subscribe to the announce RubTextUpdatedInModel of the RubScrolledTextMorph, the styling sometimes works, sometimes doesn't.
> What I noticed in the method RubScrolledTextMorph>>whenTextUpdatedInModel:
> the announcement is done before setting the text in the morph and if I change this to make the announcement after setting the text, everything works fine.
> 
> So my question is:
> Is there something special to announcer the set of the text before actually setting it? Is it ok to change it? 
> OR
> Is another way to do what I want to do?
> 
> Bests,
> Miguel





More information about the Pharo-users mailing list