Instance Mode - calling other sketches

It does work on OpenProcessing too: :partying_face:

However, b/c we can’t control the order the multi-tabs are loaded there, the global variable sketches[] defined within the main tab may not exist yet when the other tabs happen to be run 1st. :grimacing:

As a workaround, we can have this statement on each tab: :toolbox:
var sketches = window.sketches || [];

It makes sure to create an Array and assign it to sketches[] if 1 isn’t already present in it. :bulb:

1 Like