def onPopupTrigger(self, rowIndex, colIndex, colName, value, event):
if colIndex != 0:
#only popup on column 0 = the tag name
# to trigger a popup, right click on column 0
# on a record
return
# generate a full name for this tag. Prepend the tag name
# with the top level group name 'PlcShift' and the configured
# app name. 'AppName' is a custom property on this window
fullname = "[default]PlcShift/" + self.parent.AppName + "/" + value
# read the configuration of this tag from the system
config = system.tag.getConfiguration(fullname)
# see if the tag is writeable
readOnly = config[0]['readOnly']
readOnlyDesc = ""
enableUpdate = True
if readOnly == True:
readOnlyDesc = " (READ ONLY)"
enableUpdate = False
# populate the selected tag name field and append READ ONLY
# if the tag is not writeable
self.parent.getComponent('LabelSelectedTagName').text = fullname + readOnlyDesc
# enable the button if the
self.parent.getComponent('Button').componentEnabled = enableUpdate