<div dir="auto">Thanks, Mariano!<div dir="auto"><br></div><div dir="auto">You're right!</div><div dir="auto">I keep having this feeling that #redrawNeeded does it right away.</div><div dir="auto">My bad.</div><div dir="auto"><br></div><div dir="auto">Cheers!</div><div dir="auto">Nico PM</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 8, 2024, 13:05 Mariano Montone <<a href="mailto:marianomontone@gmail.com">marianomontone@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>

  
    
  
  <div>
    <p>Hi Nico,</p>
    <p>I think there's no performance penalty. #redrawNeeded just sets a
      flag to mark the Morph for a redraw for the next iteration of
      Morphic "drawing loop". <br>
    </p>
    <p>The change does not happen immediately.<br>
    </p>
    <p>So, you can mark as many Morphs as you want for redrawing and for
      layout, and they are updated in next Morphic loop iteration.</p>
    <p>If that's the case, then I think it would be good to add
      #redrawNeeded to the #label: protocol.<br>
    </p>
    <p>I can can be wrong, though..<br>
    </p>
    <p>    Mariano<br>
    </p>
    <div>El 8/6/24 a las 12:58, Nicolás Papagna
      Maldonado escribió:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="auto">
        <div>Hi folks!</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Not an expert, but my hunch is that those
          methods don't call #redrawNeeded because it's up to the caller
          to decide that.</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">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.</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Maybe that's the case (I'm sure that Juan knows
          about this).</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Cheers,</div>
        <div dir="auto">Nico PM</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto"><br>
          <br>
          <div class="gmail_quote" dir="auto">
            <div dir="ltr" class="gmail_attr">On Fri, Jun 7, 2024, 21:12
              Mariano Montone via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank" rel="noreferrer">cuis-dev@lists.cuis.st</a>>
              wrote:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
              El 7/6/24 a las 16:14, Mark Volkmann via Cuis-dev
              escribió:<br>
              > I opened an Inspect window for a
              PlugglableButtonMorph that is visible <br>
              > in the world.<br>
              > I entered this in the bottom pane and pressed cmd-d
              to "Do it":<br>
              > self label: 'My New Label'.<br>
              > The label on the button did not update.<br>
              Yes. I think a #redrawNeeded should be sent in #label: or
              #label:font: <br>
              implementations.<br>
              > Then I entered this and pressed cmd-d:<br>
              > self color: Color pink.<br>
              > The background color changed AND the label updated.<br>
              > Is there a reason why the label update didn't occur
              until I <br>
              > changed the color?<br>
              <br>
              The reason is that the #label: message does not call
              #redrawNeeded <br>
              (although I think it should).<br>
              <br>
              You can solve it by sending it yourself: myButton label:
              'My label'; <br>
              redrawNeeded.<br>
              <br>
              Same problem if the change of a button label affects the
              layout (it <br>
              does). You need to call
              #someSubmorphPositionOrExtentChanged on the <br>
              button's owner manually yourself.<br>
              <br>
              Not ideal.<br>
              <br>
              <br>
                   Mariano<br>
              <br>
              -- <br>
              Cuis-dev mailing list<br>
              <a href="mailto:Cuis-dev@lists.cuis.st" rel="noreferrer noreferrer" target="_blank">Cuis-dev@lists.cuis.st</a><br>
              <a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
  </div>

</blockquote></div>