<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><font face="Georgia">Your code seems to make changes to destForm,
        but nothing in this method tells me what causes destForm to
        actually appear on the screen. In addition to knowing how often
        this method is called, knowing how often #drawOn: for the
        calendar is called would give you a more complete picture.</font><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 12/26/17 10:13 PM, Louis LaBrunda
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:4f364dpm4easchag21504au0kqj8oufodv@4ax.com">
      <pre wrap="">Hi Bob,

Thanks for the answer.  I will give:

        self changed.

a try tomorrow.  #stepTime returns 1000.  The code is called every second.  I have checked with
messages to the transcript.  The method #displayDateTimeHeader is called every second.  It
clears the area.  Most of the text is repeated until the minute changes but the seconds change
with every call.  I don't understand why it doesn't redraw.  I may be breaking some rule with
how the morph is defined.  If so, I'm not sure what it is.  If sending self changed doesn't
work, maybe I will post a fileout of the whole morph, if you would be kind enough to take a
look.

Lou


On Tue, 26 Dec 2017 20:00:56 -0500, Bob Arning <a class="moz-txt-link-rfc2396E" href="mailto:arning315@comcast.net"><arning315@comcast.net></a> wrote:

</pre>
      <blockquote type="cite">
        <pre wrap="">Morphs redraw when something has changed -- not much point in wasting 
cycles if everything is the same. So somewhere, like the Calendar... or 
an inner morph that only contains the time needs 2 methods like:


step

    self changed

stepTime

    ^1000    "or less"


On 12/26/17 7:22 PM, Louis LaBrunda wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">Hi All,

I'm making a CalendarDisplayMorph.  The code below is called every second.  I'm sure it is
being called every second.  But the seconds don't change every second.  It does change if I
click on the morph and select or move it or something.

I'm testing it with this:

        (TransformationMorph new asFlexOf: CalendarDisplayMorph new) openInWorld.

What am I missing?

Lou

displayDateTimeHeader
        "Display the date and time in the header."
        | font rect canvas fWidth weekDay dateString timeString |

        font := TextStyle default fontOfSize: 96.
        fWidth := self extent x.

        canvas := destForm getCanvas.
        rect := Rectangle origin: 0@0 extent: fWidth@headerHeight.
        canvas frameAndFillRectangle: rect fillColor: self cellColor borderWidth: 2 borderColor: self
borderColor.
        currentDate := DateAndTime now.

        weekDay := currentDate dayOfWeekName asString.
        self drawString: weekDay centeredIn: rect vOffset: 5 withFont: font color: self textColor.

        dateString := currentDate monthName, ' ', currentDate dayOfMonth printString, ', ',
currentDate year printString.
        self drawString: dateString centeredIn: rect vOffset: 35 withFont: font color: self
textColor.

        timeString := String streamContents: [:aStream | currentDate asTime print24: false
showSeconds: true on: aStream].
        self drawString: timeString centeredIn: rect vOffset: 65 withFont: font color: self
textColor.
</pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <br>
  </body>
</html>