title: YUI3 Plugin.base not rendering
body: <p>I'm trying to use a yui plugin that pulls from a json file and populates a div on the page. Everything should be a go, however, since the plugin never gets to the render stage, the rest of it does not run. It is successfully loaded otherwise (if I stick an alert or console.log at the beginning of the event, it works fine).</p>
  
  <p>Here's the code:</p>
  
  <pre><code>YUI.add('events', function(Y) {
  
     var urlEvents = //"/cgi-bin/eventview-json/?cal=admissions/events&amp;days=10";
                         "/admissions/events/events.json";
  
     //var eventContainer = $("#insert-events");
     /* EventList class constructor */
     var EventList = function(config) {
        EventList.superclass.constructor.apply(this, arguments);
     };
  
     /*
      * Required NAME static field, to identify the class and
      * used as an event prefix, to generate class names etc. (set to the
      * class name in camel case).
      */
     EventList.NAME = "EventList";
  
     /*
      * Required NS static field, to identify the property on the host which will,
      * be used to refer to the plugin instance ( e.g. host.feature.doSomething() )
      */
     EventList.NS = "EventList";
  
     /*
      * The attribute configuration for the plugin. This defines the core user facing state of the plugin
      */
     EventList.ATTRS = {};
  
  
     var convertYYYYMMDDtoJS = function(s) {
  
        var a, jsdate = null;
  
        try {
  
           a = /^(\d\d\d\d)(\d\d)(\d\d)$/.exec(s);
  
           if (a) {
              jsdate = new Date(a[1], a[2]-1, a[3]);
           }
        } catch (ex) {
           /* Nothing */
        }
  
        return jsdate;
     };
  
  
     var insertEvents = function(id, response, e) {
      alert('hello');
        var i, resp, events, event, html, jsdate, label, seenevent, yyyymmdd;
        var maxevents = 5, eventcount;
  
        try {
           resp = Y.JSON.parse(response.responseText);
           events = resp.results;
  
           html = "";
           seenevent = {};
           eventcount = 0;
           yyyymmdd = "";
           for (i = 0; i &lt; events.length; i++) {
              event = events[i];
              if (seenevent[event.title]) {
                 continue;
              }
              seenevent[event.title] = true;
  
              if (event.date !== yyyymmdd) {
                 // This is the first event on this date.
  
                 // If we've seen maxevents events, then bail before starting a new day.
                 if (eventcount &gt;= maxevents) {
                    break;
                 }
  
                 // Put out a new label for this day.
                 jsdate = convertYYYYMMDDtoJS(event.date);
                 label = Y.DataType.Date.format(jsdate, {format: "%b %e %a"});
  
                 /*
                  * The first empty div below, "&lt;div class='clear'&gt;&lt;/div&gt;" is only needed for IE 7.
                  * IE 7 does not properly clear both left and right floats when "clear: both" is specified
                  * if the element itself is floated.  The extra div clears the floats, but isn't floated
                  * itself.  The extra div doesn't cause any grief in newer browsers, so I add it always.
                  */
                 html += "&lt;div class='clear'&gt;&lt;/div&gt;&lt;div class='event-datelabel'&gt;" + label + "&lt;/div&gt;\n";
                 yyyymmdd = event.date;
              }
  
              html += "&lt;div class='event-text'&gt;" + event.html + "&lt;/div&gt;\n";
                          eventcount++;
           }
           this.get('host').setContent(html + "&lt;div id='events-footer'&gt;&lt;a href='/calendar/'&gt;all events&lt;/a&gt;&lt;/div&gt;");
  
  
        } catch(ex) {
           console.log("Error", ex);
           this.get('host').setContent("Event list not available");
           return;
        }
     };
  
  
  var insertEventList = function(yyyy, mm, dd) {
  
     var url = urlEvents;
  
     if (yyyy) {
        url += '&amp;yyyy=' + yyyy;
     }
     if (mm) {
        url += '&amp;mm=' + mm;
     }
     if (dd) {
        url += '&amp;dd=' + dd;
     }
  
     Y.io(url, {on: {success: insertEvents}, context: this});
  
  };
  
     /* EventList extends the base Plugin.Base class */
     Y.extend(EventList, Y.Plugin.Base, {
          render: function() {
          insertEventList.call(this);
      }
  
     });
     //console.log("assigning", EventList);
     Y.namespace("Plugin").EventList = EventList;
  
  }, '1.0.0' ,{requires:['node', 'base', 'plugin', "json-parse", "datatype-date"]});
  </code></pre>
  
  <p>Here's the excerpt from the code with the render bit:</p>
  
  <pre><code>Y.extend(EventList, Y.Plugin.Base, {
          render: function() {
          insertEventList.call(this);
      }
  </code></pre>
  
  <p>Admittedly, YUI3 confuses me, and I would prefer other libraries, but I don't have a choice in this situation. There's likely one thing that I've just completely looked over.</p>
  
  <p>Thanks guys</p>