Ciao a tutti,
Recentemente mi sono appassionato allo scripting jmp e sto facendo del mio meglio per impararlo.
L'obiettivo dell'esempio seguente è mostrare il valore della "Colonna" per le righe selezionate.
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 ),
);<BR />
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] );
);
);<BR />
my_obj = New Object( Test_Class( dt, Cols ) );Codice di errore:
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
Ho provato a utilizzare lo script al di fuori di una classe e sembra funzionare, hai qualche idea di cosa c'è che non va nell'implementazione di cui sopra.
CIAO,
Non dici quale versione di JMP stai utilizzando. Questo ha funzionato bene per me con JMP 17. Hai quanto segue nella parte superiore del tuo script?
i nomi sono predefiniti qui ( 1 );
Se hai diversi script in esecuzione, può fare la differenza.
Brian Corcoran
Sviluppo JMP
Hai qualche motivo specifico per costruirlo con le classi? Se hai appena iniziato con lo scripting JMP, direi che stare lontano dalle lezioni potrebbe essere una buona idea.
Ciao Brian,
Ci scusiamo per non essere più specifico, lo script sopra viene eseguito ma l'errore appare premendo il pulsante SelectedRows.
Lo sto eseguendo su JMP 17.