Pasting code on a binding script transform problematic

Hello!

Not sure if this happens to anyone else, but I noticed whenever I try to paste some code on the script transform of a binding the Ignition Designer freeze.

I think it might be because it's trying to auto-update the output while the code’s still being pasted or processed? Not 100% sure though — could also just be my machine struggling.

Just wanted to share it in case it helps.

Cheers!

Best solution, disable your bindings while you changing the transform scripts.

How much code are you pasting, and when you say 'freeze' is there a warning in the output console window/designer logs about a "Non-Responsive EDT" file being generated?

I will check the logs and let you know, thanks.
There is not warning.

Average size of script transform similar size to :

	from java.text import SimpleDateFormat
	from java.util import Calendar
	
	try:
	    selectedRow = self.props.selection.selectedRow
	    myDataset = self.props.data
	
	    if not myDataset or selectedRow == -1:
	        self.getSibling("chartDistri").props.dataSources.example = []
	    else:
	        chartData = []
	        inputFormat = SimpleDateFormat("MM/yy")        
	        outputFormat = SimpleDateFormat("MM/yy")       
	        sortFormat = SimpleDateFormat("yyyy-MM-dd")    
	
	        for colIndex in range(myDataset.getColumnCount()):
	            columnName = myDataset.getColumnName(colIndex)
	
	    
	            if columnName.endswith("/25"):
	                try:
	                    value = float(myDataset.getValueAt(selectedRow, colIndex))
	                except (ValueError, TypeError):
	                    value = 0.0
	
	                try:
	                    date = inputFormat.parse(columnName)
	                    cal = Calendar.getInstance()
	                    cal.setTime(date)
	                    cal.set(Calendar.DAY_OF_MONTH, 1)
	                    finalDate = cal.getTime()
	
	                    chartData.append({
	                        "t_stamp": outputFormat.format(finalDate),
	                        "process_temp": value,
	                        "sortKey": sortFormat.format(finalDate)
	                    })
	                except:
	                    continue
	
	    
	        chartData.sort(key=lambda x: x["sortKey"])
	
	        for d in chartData:
	            d.pop("sortKey", None)
	
	        self.getSibling("chartDistri").props.dataSources.example = chartData
	
	except Exception as e:
	    self.getSibling("TextArea").props.text = "Error: {}".format(e)

Much like in your other thread, you posted gateway logs.

The Designer is an application running on your local computer. If it "freezes", the gateway doesn't know anything about that. It has its own, local logging that you need to consult.