Odd script behavior for the GoTo message<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />I'm puzzled about a simple script I want to write using the GoTo message. I want to add a button to a script that will allow the user to go to a column in a data table. The following, copied from the Script Index and which is the basis for what I want, works fine:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" );
dt << Go to( 2 );
However, the following does not:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" );
i = 2;
dt << Go to( i );
I get back a beep with Scriptable[] in the log. Why won't the second one go to column 2? How can I make this happen?
Thanks for any help.
Walt Paczkowski
Re: Odd script behavior for the GoTo messageI could find two ways for this:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" );
i = 2;
Eval(Parse(EvalInsert("dt << Go to(^i^)")));
From p. 431 of jmp scripting guide I adapted the example to this:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" );
i = 2;
eval(eval expr(dt << Go to(Expr(i))));
Sometimes JMP doesn't evaluate the arguments of functions. I'm not really sure when this happens and why but it always confuses me.