             println("Information: retrieved %d records", result.count)
             
             self.tableView.reloadData()
-            self.refreshControl.endRefreshing()
+            self.refreshControl?.endRefreshing()
         }
     }
     

        // Do any additional setup after loading the view, typically from a nib.
        
        let client = MSClient(applicationURLString: "ZUMOAPPURL", applicationKey: "ZUMOAPPKEY")
                
        self.table = client.tableWithName("TodoItem")!
        self.refreshControl.addTarget(self, action: "onRefresh:", forControlEvents: UIControlEvents.ValueChanged)
        
        self.refreshControl.beginRefreshing()
        self.onRefresh(self.refreshControl)
    }
    

        }
    }
    
    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int
    {
        return self.records.count
    }
    
    override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let CellIdentifier = "Cell"
        
        let cell = tableView.dequeueReusableCellWithIdentifier(CellIdentifier, forIndexPath: indexPath) as UITableViewCell
        let item = self.records[indexPath.row]
        
        cell.textLabel?.text = item["text"] as? String
        cell.textLabel?.textColor = UIColor.blackColor()
        
        return cell
    }
