 			for oldIndex in oldIndexes {
 				if oldIndex < row {
 					tableView.moveRowAtIndex(oldIndex + oldIndexOffset, toIndex: row - 1)
-					print("move \(oldIndex+oldIndexOffset) +> \(row-1)")
+//					print("move \(oldIndex+oldIndexOffset) +> \(row-1)")
 					if tableView == self.playlistTableView {
 						self.playlists = self.rearrange(self.playlists, fromIndex: (oldIndex+oldIndexOffset), toIndex: (row-1))
 					} else {

					item.rank = (rank + 1)
				}
				tableView.reloadData()
/*				for (item in list as! PlayItem)
					print("(rank) -> \(item[rank].rank)")
					rank += 1
				}

				for item in self.playitemArrayController.arrangedObjects as! [AnyObject] {
					print("item.rank \(item.rank) -> \(rank)")
//					item.setValue(rank, forKey: "rank")
					rank += 1;
				}
*/			}

			tableView.endUpdates()
		}
		

			playlistArrayController.removeObject(selectedPlaylist)
		}
	}

	@IBAction func playPlaylist(sender: AnyObject) {
		if let selectedPlayItem = playitemArrayController.selectedObjects.first as? PlayItem {
			let selectedPlaylist = playlistArrayController.selectedObjects.first as? PlayList
//			super.dismissController(sender)

			print("play \(selectedPlayItem.name) from \(selectedPlaylist!.name)")
		}
		else
		if let selectedPlaylist = playlistArrayController.selectedObjects.first as? PlayList {
			if selectedPlaylist.list.count > 0 {
//				super.dismissController(sender)

				print("play \(selectedPlaylist.name) \(selectedPlaylist.list.count)")
				for (i,item) in selectedPlaylist.list.enumerate() {
					print("\(i) \(item.rank) \(item.name)")
				}
			}
		}
