Hello Everyone,
Recently I got into jmp scripting, and am trying my best to learn it.
The goal of the example below is to show the value of the "Column" for the selected rows.
Cols = {"NPN1", "PNP1", "PNP2", "NPN2", "PNP3", "IVP1", "PNP4", "NPN3", "IVP2", "NPN4", "SIT1", "INM1", "INM2",
"VPM1", "VPM2"};
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
Define Class(
"Test_Class",
_init_ = Method( {dt, Cols},
my_dt = dt;
my_cols = Cols;
Make_Win();
);
Make_Win = Method( {},
New Window( "ProcessScreening",
Vlist_box = V List Box(
PS,
MyButton = Button Box( "SelectedRows", SendRows ),
),
),
);
PS = dt << Process Screening(
Y( Eval(my_cols)),
Control Chart Type( "Indiv and MR" ),
Minimum Process Length( 1 ),
Use Medians instead of Means( 1 ),
Show tests( 0 ),
Test 1( 0 ),
Cp( 1 ),
Spec Limits( 1 ),
);
SendRows = Expr(
print_cols = Report( PS )[Table Box( 1 )][String Col Box( 1 )] << getselectedrows();
Print( Report( PS )[Table Box( 1 )][String Col Box( 1 )][print_cols] );
);
);
my_obj = New Object( Test_Class( dt, Cols ) );
Error code:
Send Expects Scriptable Object in access or evaluation of 'Send' , my_dt << /*###*/Process Screening(
Y( Eval( my_cols ) ),
Control Chart Type( "Indiv and MR" ),
Minimum Process Length( 1 ),
Use Medians instead of Means( 1 ),
Show tests( 0 ),
Test 1( 0 ),
Cp( 1 ),
Spec Limits( 1 )
) /*###*/
object not subscriptable in access or evaluation of 'Report(PS)[ /*###*/Table Box(1)]' , Report( PS )[/*###*/Table
I tried to use the script outside a class and it seems to work, do you have any clue of what is wrong with the above implementation.