title: Why is my knockout module losing it's binding when receiving a PubNub message?
body: <p>In a knockout module, I have an observable array that is iterated in the view using a foreach:</p>
  
  <pre><code>    &lt;div id="data" data-bind="foreach: dataItems, visible: !loading()"&gt;
        &lt;!-- ko compose: {model: $data} --&gt;&lt;!-- /ko --&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>I have a function to fill this observable array, this way:</p>
  
  <pre><code>    var dataItems = ko.observableArray();
      var getItems = function(isAMessage){
          dataItems([]);
          dataItems.push(new dataItem('1'));
          dataItems.push(new dataItem('2'));
          dataItems.push(new dataItem('3'));
  
          if (isAMessage) {
              dataItems.push(new dataItem('4'));
              dataItems.push(new dataItem('5'));
              dataItems.push(new dataItem('6'));
          }
      }
  </code></pre>
  
  <p>And in the activate funcion of the module, I'm subscribing to a pubnub channel, this way:</p>
  
  <pre><code>    var activate = function () {
          getItems(false);
  
          var pubnub = PUBNUB.init({
              publish_key: 'pub-...',
              subscribe_key: 'sub-...'
          });
  
          pubnub.subscribe({
              channel: 'someChannel',
              message: function (m) {
                  getItems(true);
              }
          });
      };
  </code></pre>
  
  <p>The thing is that when I receive a pubnub message, the function gets called but the observable array dataItems has no subscriptors, so, the view is not updated. When the function getItems is called from the activate function, dataItems has 2 subscriptors, but when it's called from the pubnub message callback, it has none. I don't know what am I doing wrong!!!</p>