def SetItemWindow(self, item, itemWindow, modifyWindowFactory = None):
		self.propertiesPane.tree.DeleteItemWindow(item)
		errorMessage = self.GetErrorMessage(item.xmlNode)
		if errorMessage or itemWindow is not None:
			itemWindow = ItemWindowWithError(self.propertiesPane.tree, errorMessage, itemWindow, modifyWindowFactory, item.xmlNode)
			self.propertiesPane.tree.SetItemWindow(item, itemWindow)