Is it possible to retain the perspective session scope in the system.tag.readAsync callback function?
In this case, I am reading a tag and trying to call the system.perspective.* functions but I keep getting an error because there is not a session attached to the thread. Below is the test script I have on a button.
def runAction(self, event):
import system
def callBack(aync):
path = '[]SITE/Anodizing/Crew/Load Crew/Crew/Crew Info'
data=aync[0].value
for row in range(data.getRowCount()):
if data.getValueAt(row,0)==self.view.params.Name and data.getValueAt(row,1)==self.view.params.EmployeeID:
data1=system.dataset.deleteRow(data, row)
system.tag.writeBlocking(path, data1)
system.perspective.closePopup(id='abrR7MU8')
system.tag.readAsync(['[MES_SITE_ASSET]SITE/Anodizing/Crew/Load Crew/Crew/Crew Info'], callBack)
Obviously this is a simple case where readBlocking is probably the best approach, but it got me thinking about this and if it is possible.