선택이 완료된 후 데이터를 보내기 위해 누르는 버튼을 구현할 수 있습니까?
@jthi
그렇게 시작했는데 투박하고 흐름이 끊겨서 싫다.
내가 정말로 원하는 것은 javascript 선택 이벤트처럼 작동하는 것입니다.
그래프에서 선택 상자를 드래그한 다음 선택한 행을 JSON으로 수집하고 html/javascript 영역에서 localhost 서버로 전송합니다.
스케줄러를 사용하여 원하지 않는 이벤트의 쓸모 없는 스팸을 쌓고 계속해서 대기열을 비워 수많은 스팸 이벤트가 실행되는 것을 방지합니다.
선택 메커니즘을 완전히 다시 작성하는 것을 포함하여 이전에 mousebox 항목을 사용해 보았지만 느리고 자체 단점이 너무 많았습니다.
https://community.jmp.com/t5/Discussions/Is-there-a-way-to-make-the-rowstate-handler-less-laggy/mp/550590
// This is the row state handler
f = Function({x},
try(s << Clear Schedule);
//wait(2);
if(Is Empty(last_array),last_array = -1);
current_array = summary_jmp_table << get selected rows();
/**/
// These "If" conditions stop it from needlessly spamming events out to the server that's going to draw an interactive app
// Can't just compare 2 arrays to see if they are exactly the same. It tries to compare every number in the 2 arrays by index position, so the SUM of that is used to tell if they are different.
if((length(current_array) >0) & (sum(current_array) != sum(last_array)) & (global_iframe_counter>0) ,
//show("we have a go");
s = Schedule(.225,
//json = As JSON Expr(current_array);
json = sel_rows_2_JSON(); //a function that gets selected rows and bundles them up into JSON to send my data request
request = New HTTP Request(
URL("localhost:8088/jmp_data"),
Method("Post"),
Timeout( .001 ),
JSON(json),
);
//data=request << Send;
//show(data);
//wait(0);
try(s << Stop);
try(s << Clear Schedule);
//wait(0);
last_array = current_array;
// saves the last array, this stops it from spamming out events for no reason when you hover over points on a graph.
//I don't know WHY hover fires a row state event, but it does.
data=request << Send;
), // end schedule
//show("didn't meet IF condition somehow");
); // end if
);// end function f