Obtener lote / modo interactivoMe pregunto si hay una manera de suprimir las ventanas modales de forma nativa. Lote interactivo no parece.
Names default to here(1);
batch interactive(1);
new window("Test", <<MODAL></MODAL>
Así que me pregunto si hay una manera de obtener el modo interactivo por lotes actual para poder hacer algo como esto.
Names default to here(1);
batch interactive(1);
if(batch interactive(), // or some other internal variable
print("YAY")
, // else
new window("Test", <<MODAL></MODAL>
Obviamente puedo hacer mi propia variable de lote, pero me pregunto si hay algo incorporado.
Re: Obtener modo por lotes/interactivoGracias por la info.
Con la ayuda del soporte de JMP 
batch interactive(boolean) returns the previous setting.
Names default to here(1);
//works for both options
//batch interactive(0);
//batch interactive(1);
last setting = batch interactive(1); // return value is last setting
batch interactive(last setting); // reset it in case we set it erroneously
if(last setting,
print("YAY")
, // else
new window("Test", <<MODAL> </MODAL>
Re: Obtener modo por lotes/interactivoEl mío siempre comienza con 1, lo que me hace pensar que JMP está en lotes. Lo cual definitivamente no lo es. ¿Cuando inicias la primera devolución te da 0?
Re: Obtener modo por lotes/interactivobuen punto ...
Parece que cuando ejecutamos un script, JMP se inicia automáticamente con " Batch Interactive " configurado en 1 de forma predeterminada.
- de manera que no aparezca ningún mensaje de advertencia e interfiera con el script.
Lo cual definitivamente no lo es.
¿Quizás existen diferentes tipos de "advertencias"? - ¿Y algunos de ellos ignoran esta configuración predeterminada de “Batch Interactive” ~ 1 y, por lo tanto, necesitan un lote interactivo(1) explícito enviado a través de JSL para "callarse"?
Como Eval(arg) frente a Eval(Eval Expr(.... Expr(arg)...):
Una parte de las plataformas y funciones JMP solo necesita Eval() alrededor de un argumento para solucionar problemas de referencia de variables.
Por otra parte, el enfoque Eval(arg) fallará y el usuario tendrá que recurrir a Eval(Eval Expr(.... Expr(arg)...).
... y la diversión diaria de los scripters JSL y el soporte JMP es descubrir qué función pertenece a qué grupo.
Re: Obtener modo por lotes/interactivoEjemplos de los diferentes comportamientos de la interacción por lotes y los diferentes modos "predeterminados":
Names Default To Here( 1 );
testMarkup = Function( {},
text = Text Box("Bad XML <");
text << markup;
);
// Run the next four lines individually
testMarkup(); // no special setting: default
batch interactive(1);testMarkup(); // batch interactive is turned "on" so we see an error
batch interactive(0);testMarkup(); // batch interactive is turned off so we can show an error
new window("test",buttonbox("Test", testMarkup())); // running jsl in response to a click is not batch interactive mode
new window("test",buttonbox("Test", batch interactive(1);testMarkup())); // set batch interactive to 1 so the error message goes to the log and there is no modal dialog
// the findings:
// default -> no dialog
// 1 -> no dialog
// 0 -> dialog
// Run the next 3 lines individually to check if formula errors behave the same as above
:col1 << remove formula(); // no special setting: default
batch interactive(1);:col1 << remove formula(); // batch interactive is turned "on"" so we see an error
batch interactive(0);:col1 << remove formula(); // batch interactive is turned off so we can show an error
// the findings:
// default -> dialog (!!!!!)
// 1 -> no dialog
// 0 -> dialogDel soporte de JMP, obtuve la información:
La función Batch Interactive() no está documentada. El comportamiento puede diferir en diferentes situaciones y puede cambiar en el futuro. De hecho, puede considerarse experimental y sin fundamento.