title: Adding a checkboxgroup dynamically to a formpanel
body: <p>I am building a checkboxgroup with the items got from a store which gets loaded in the Ext.OnReady function. I am trying to add this checkbox group to a formpanel and get this error in the add() call. 'events' is null or not an object.</p>
  
  <p>Here is the code I am trying with..</p>
  
  <pre><code>Ext.onReady(function () {
  {
      store.each(function (record) {
          var itemID = record.get('itemID')
          var itemDesc = record.get('itemDesc');
          jsonDataArray.push([itemID,itemDesc]);
      });
  
      myCheckboxGroup = new Ext.form.CheckboxGroup({
          id: 'chk1',
          xtype: 'checkboxgroup',
          width: 520,
          border: true,
          items: jsonDataArray
      });
  
      myForm.add(myCheckboxGroup);
      myForm.doLayout();
  }
  
  var myForm = new Ext.form.FormPanel({
       id: 'myForm',
              region: 'center',
              border: true,
              autoHeight: true,
              items: myCheckboxGroup
  
  });
  </code></pre>