 		self.delete(object)
 	}
 	
-	public func delete(object:NSManagedObject) {
+	public func delete(object:D.ManagedObject) {
 		
 		self.context.performBlockAndWait {
 			var error:NSError?

import CoreData


public protocol DataSourceDelegate : NSObjectProtocol {
	
	func dataSourceWillChangeContent(dataSource:DataSource)
	func dataSourceDidChangeContent(dataSource:DataSource)
	
	func dataSource(dataSource:DataSource, didInsert section:Int)
	func dataSource(dataSource:DataSource, didDelete section:Int)
	
	func dataSource(dataSource:DataSource, didInsert object:NSManagedObject, at indexPath:NSIndexPath)
	func dataSource(dataSource:DataSource, didDelete object:NSManagedObject, at indexPath:NSIndexPath)
	func dataSource(dataSource:DataSource, didUpdate object:NSManagedObject, at indexPath:NSIndexPath)
	func dataSource(dataSource:DataSource, didMove object:NSManagedObject, at indexPath:NSIndexPath, to:NSIndexPath)
	
	func dataSource(dataSource:DataSource, associateFor object:NSManagedObject, at indexPath:NSIndexPath) -> AnyObject
	func dataSource(dataSource:DataSource, shouldDelete object:NSManagedObject, at indexPath:NSIndexPath)
}


//MARK: -

public class DataSource : NSFetchedResultsControllerDelegate {

	public weak var delegate:DataSourceDelegate?
	
	public let context:NSManagedObjectContext
	public let request:NSFetchRequest

		}
	}
	
	public func controller(controller:NSFetchedResultsController, didChangeObject object:D.ManagedObject, atIndexPath indexPath:NSIndexPath!, forChangeType type:NSFetchedResultsChangeType, newIndexPath:NSIndexPath!) {
		
		switch type {
			case .Insert: self.delegate?.dataSource(self, didInsert:object, at:newIndexPath)
