[Cuis-dev] possible morph bug
Nicolás Papagna Maldonado
nicolas.papagna at gmail.com
Sat Jun 8 08:58:00 PDT 2024
Hi folks!
Not an expert, but my hunch is that those methods don't call #redrawNeeded
because it's up to the caller to decide that.
Escenario: I am changing many things about a morph/button (say label,
color, etc) and I want it to be redrawn only when Im done to keep things
optimized.
Maybe that's the case (I'm sure that Juan knows about this).
Cheers,
Nico PM
On Fri, Jun 7, 2024, 21:12 Mariano Montone via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:
>
> 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
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240608/a60641b6/attachment.htm>
More information about the Cuis-dev
mailing list