         distance = theEnd - total
         if distance < @lastDistance
           if (total >= theEnd) && e.contentSize.height > e.size.height && @table.hasMoreRows
-            @settings.infiniteScrollCallback()
+            @options.infiniteScrollCallback()
         @lastDistance = distance
       )
     


    @i = 0
    for item in items
      @table.appendRow(root.app.create(@settings.rowClassName, { item: item }).row)
      
      if @i == 0 && rowToDeleteIndex
        @table.deleteRow(rowToDeleteIndex)

root.SearchResultsTable_Framework = class SearchResultsTable_Framework
  constructor:(options = {}) ->
    @options = root._.extend({
      onTableClick: (e) =>
      infiniteScroll: true
      infiniteScrollCallback: (e) => Ti.API.info("scrolled to bottom")
      rowClassName: "SearchResultsTableRow"
      top: "auto"
    }, options)
    
    @table = Ti.UI.createTableView({
      top: @options.top
    })
    @moreRow = root.app.create("SearchResultsTableMoreRow").moreRow
    
    if @options.infiniteScroll
      @lastDistance = 0

      @table.addEventListener("scroll", (e) =>
