 		}
 	}
 	
+	var numberOfVisibleItems: Int {
+		var count = 0
+		for section in sections {
+			count += section.cells.visibleItems.count
+		}
+		return count
+	}
 
-	// MARK: UITableViewDataSource, UITableViewDelegate
-	
+	public override var debugDescription: String {
+		var result = [String]()
+		result.append("============ number of sections: \(sections.count)")
+		for (sectionIndex, section) in sections.enumerated() {
+			result.append("  --- section: \(sectionIndex), number of cells: \(section.cells.visibleItems.count)")
+			for (rowIndex, item) in section.cells.visibleItems.enumerated() {
+				let cellType = type(of: item.cell)
+				let s = "    \(sectionIndex).\(rowIndex) \(cellType)"
+				result.append(s)
+			}
+		}
+		result.append("============")
+		return result.joined(separator: "\n")
+	}
+
 	func trace(_ items: Any?..., function: String = #function) {
 		//print("\(function) - \(items)")
 	}
-	
+}
+
+extension TableViewSectionArray: UITableViewDataSource {
 	public func numberOfSections(in tableView: UITableView) -> Int {
 		let returnValue = sections.count
 		trace(returnValue)

		scrollView.form_firstResponder()?.resignFirstResponder()
		return true
	}
	
	
	// MARK: CustomDebugStringConvertible
	
	public override var debugDescription: String {
		var result = [String]()
		result.append("============ number of sections: \(sections.count)")
		for (sectionIndex, section) in sections.enumerated() {
			result.append("  --- section: \(sectionIndex), number of cells: \(section.cells.visibleItems.count)")
			for (rowIndex, item) in section.cells.visibleItems.enumerated() {
				let cellType = type(of: item.cell)
				let s = "    \(sectionIndex).\(rowIndex) \(cellType)"
				result.append(s)
			}
		}
		result.append("============")
		return result.joined(separator: "\n")
	}

	var numberOfVisibleItems: Int {
		var count = 0
		for section in sections {
			count += section.cells.visibleItems.count
		}
		return count
	}
}

		let returnValue = sections[section].tableView(tableView, titleForFooterInSection: section)
		trace(section, returnValue)
		return returnValue
	}
}

extension TableViewSectionArray: UITableViewDelegate {
	public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
		sections[indexPath.section].tableView(tableView, didSelectRowAt: indexPath)
		trace(indexPath)
	}
	
	public func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
