Is there a way to create global variables from within a piston in webcore. I know the general way is to create global variables from the webcore ide at the top right of the screen. But, if there were some way within a piston or another way to create global variables programmatically, that would be very helpful.
Does anyone know if this is possible or not? And if so, how can this be done?
Thx
You’re probably better off asking this in the WebCore forum itself, although looking at it, I don’t know that there would really be much use for this particular functionality, other than being able to keep your global variables in the same place.
Maybe having a “global variable piston” that would run only once and allow you to define the variables might come in handy for the purposes of organization, but overall that’s no different than just creating the variable in the same way you do now.
After all, it’s not like you’re going to create a global more than once, and you would set it from any piston, so it’s basically the same way that things are set now.
Well I do have a specific use case for setting up a new environment multiple times. Granted, It would only be done once to initialize the environment (or resetting it), but when having a number of global variables and setting up a number of different environments, it would be very helpful.
1 Like