Exemple #1
0
	def OnItemDeselected(self, event):
		""" Item has been deselected
		"""
		line_number = self.getColumnText(self.currentItem, 2)
		python_path = self.getColumnText(self.currentItem, 4)

		if line_number != "":
			### recuperation du model DEVS
			devs = Utilities.getInstance(Components.GetClass(python_path))
			### check error and change image
			if not isinstance(devs, tuple):
				self.SetItemImage(self.currentItem, self.idx2)
Exemple #2
0
	def OnUpdate(self, evt):
		""" Update list has been invocked
		"""

		### deep copy of data list
		D = copy.deepcopy(self.list.itemDataMap)

		### update in error line self.list.itemDataMap
		for k, v in D.items():
			line_number = v[2]
			if line_number != "":
				python_path = v[-1]
				devs = Utilities.getInstance(Components.GetClass(python_path))
				### check error and change image
				if not isinstance(devs, tuple):
					self.list.itemDataMap[k] = (v[0], "", "", v[3], v[4])

		### refresh items
		self.list.RefreshItems(-1, -1)