iPad falling over?

I have a fairly modest patch that seems to regularly break rendering on iPad over wifi. It's fine if I just load it, but if I'm regularly editing and refreshing on the iPad, after a while Safari mobile gets into a weird state with 'ghost panels' that never finish loading. The only fix I've found so far is restarting the iPad.

Anyone else come across this or got a suggestion to fix?

File attached for reference.
TribbleRig 55 trim.json (625.7 KB)

Your session is quite heavy actually and takes a long time to load on my computer (I have a fairly old laptop), it may be too much for the iPad at some point. The biggest problem I could find in the session is the repeated usage of @{} in scripts which has a terrible impact on performances in this case, you should try getting rid of all of them.

Ah yep! Thanks - gradually starting to do this now I get the syntax.

This kind of thing, right?

set("Looper" + getProp("parent", "variables").n + "Controlsaction_rowplay_columnPlayOn", 1023)

Hmm nope I don't have it. The 'wrong syntax' version works, my attempt at the right syntax doesn't:

  if (get("Looper" + getProp("parent", "variables").n + "Controlsaction_rowplay_columnPlayOn" != 1023)){
    set("Looper" + getProp("parent", "variables").n + "Controlsaction_rowplay_columnPlayOn", 1023)
  if ("Looper1Controlsaction_rowplay_columnPlayOn" != 1023){
    console.log("play wrong syntax")
    set("Looper" + getProp("parent", "variables").n + "Controlsaction_rowplay_columnPlayOn", 1023)

There are some syntax problems

"Looper1Controlsaction_rowplay_columnPlayOn" != 1023

will always return true (you're comparing a string and a number, and on line 1 this comparison shouldn't be here there should be a closing parenthesis before !=).

To make things cleaner and less error prone, try assigning variables.n to a variable instead of calling getProp every time you need it:

var n = getProp("parent", "variables").n
var widgetId = "Looper" + n + "Controlsaction_rowplay_columnPlayOn"

if (get(widgetId) != 1023) {
  set(widgetId, 1023)

ahhhh -- thanks again man. I need to go on a JS course to skill up on this stuff...