[Cuis-dev] possible morph bug

Mariano Montone marianomontone at gmail.com
Fri Jun 7 17:12:21 PDT 2024


El 7/6/24 a las 16:14, Mark Volkmann via Cuis-dev escribió:
> I opened an Inspect window for a PlugglableButtonMorph that is visible 
> in the world.
> I entered this in the bottom pane and pressed cmd-d to "Do it":
> self label: 'My New Label'.
> The label on the button did not update.
Yes. I think a #redrawNeeded should be sent in #label: or #label:font: 
implementations.
> Then I entered this and pressed cmd-d:
> self color: Color pink.
> The background color changed AND the label updated.
> Is there a reason why the label update didn't occur until I 
> changed the color?

The reason is that the #label: message does not call #redrawNeeded 
(although I think it should).

You can solve it by sending it yourself: myButton label: 'My label'; 
redrawNeeded.

Same problem if the change of a button label affects the layout (it 
does). You need to call #someSubmorphPositionOrExtentChanged on the 
button's owner manually yourself.

Not ideal.


     Mariano



More information about the Cuis-dev mailing list