Hi everyone.
I have variables in my graphics script. I can't post the exact script but I have something like:
temp = Expr(
// Graphics Script with variables, I have wrapped these variables around Eval()
);
...
Add Graphics Script (temp);
The issue is that the graphics script doesn't work when the window updates. I looked at the script using "Customize" and it just shows "temp".
So I tried:
framebox << Add Graphics Script(Eval Expr(temp));
framebox << Add Graphics Script(Eval(Eval Expr(temp)));
as well as a few other things but nothing worked. I also tried directly putting the graphics script without the Expr and temp in the <
I am using the first method in the Accepted solution to this: Adding & Removing Graphics Scripts
I wanted to use the second but it didn't work because it assumes constants and I have variables.
Also looked at this but it didn't help: https://www.jmp.com/support/notes/55/553.html
Tried my best to give as many details as possible but sorry I can't post the code!
One last note is that this is all inside a Class method. Not sure if that makes a difference in this case.
Does anyone know a solution?
Thank you.
Nevermind, that worked! I had a mistake in the code, haha. Thank you so much!
Check out the article below for a few ways to accomplish this. You are on the right track, but you need to construct it like this:
Eval( Eval Expr(
framebox << Add Graphics Script( Expr( temp ) )
) );
Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute