Loading ...
Sorry, an error occurred while loading the content.

RE: [ydn-javascript] Re: Dynamic Highlighting of Dates in Calendar

Expand Messages
  • Steven Peterson
    Matt, The render stack is not actually cleared, it is reset. This means that when you call render(), whatever renderer functions that were in the stack when
    Message 1 of 3 , Feb 23 7:32 PM
    • 0 Attachment

      Matt,

       

      The render stack is not actually cleared, it is reset. This means that when you call render(), whatever renderer functions that were in the stack when you started are put back into the stack again. The reason for this is because if you have a renderer set up for 6/25, for instance, once we have rendered 6/25, I can remove it from the stack for the rest of the render process, making the iteration through the stack much quicker. The resetRenderers() function is called when a render is complete so that if you want to render again, the stack is reset to its original state (by copying the contents of this._renderStack back into the this.renderStack array).

       

      I hope that adds a little clarity to the render stack’s internal operation for you. If I can help with anything else, as always, please let me know.

       

      Steven Peterson

      Web Developer, Platform Engineering

      Yahoo!


      From: ydn-javascript@yahoogroups.com [mailto: ydn-javascript@yahoogroups.com ] On Behalf Of Matt Warden
      Sent: Thursday, February 23, 2006 12:17 PM
      To: ydn-javascript@yahoogroups.com
      Subject: [ydn-javascript] Re: Dynamic Highlighting of Dates in Calendar

       

      On 2/23/06, Matt Warden <mwarden@...> wrote:
      > List,
      >
      > Similar to a previous problem, I need to highlight certain dates where
      > appointment timeslots are available. However, the twist is that I need
      > to be able to alter the placement of these timeslots after the
      > calendar has been rendered, and then re-render it. I have this
      > partially working like this (obviously much of the code is in there
      > just for prototyping):
      ...

      Upon further investigation, it seems the renderers are all reset after
      render() is called. So, my issue is moot.

      I would suggest lines 1687-1689 in Calendar_Core.js be changed from this:

      /**
      * Adds a renderer to the render stack. The function reference passed
      to this method will be executed
      * when a date cell matches the conditions specified in the date string
      for this renderer.

      to this:

      /**
      * Adds a renderer to the render stack. The function reference passed
      to this method will be executed
      * when a date cell matches the conditions specified in the date string
      for this renderer. The
      * renderer stack is cleared after render() is called on the calendar.

      Thanks,

      --
      Matt Warden
      Miami University
      Oxford, OH , USA
      http://mattwarden.com


      This email proudly and graciously contributes to entropy.

    Your message has been successfully submitted and would be delivered to recipients shortly.