화면 » Api

callscriptmethodparam

Description

화면에 존재하는 함수를 호출하는 API이다.

Parameters

Parameters Type Description
strCallMethod STRING 호출할 함수명
arrParam Array [옵션] 함수 파라미터 배열 (기본값: null)
bAsync BOOL [옵션] 비동기로 호출 여부(기본값: false)

Return Value

Type Description
class 호출된 함수의 리턴값 또는 true/false

Remark

bAsync 파라미터를 true로 지정한 경우, 함수는 비동기 방식으로 호출되며, callscriptmethod API의 리턴값은 파라미터값이 유효 여부를 기준으로 true/false 값이 리턴된다.

callscriptmethod, callscriptmethodex API와 다른 점은 파라미를 문자형 이외에도 오브젝트 및 배열을 전달할 수 있다는 점이다.

arrParam 파라미터는 호추된 함수에 배열로 그대로 전달되는 것이 아니라, 배열의 각 요소가 호출된 함수의 각 파라미터에 매칭되어 전달된다.

Example

function btnCallScript_on_mouseup(objInst) { var RetVal = ""; // 팝업 화면의 화면 오브젝트를 구함 var objPopupScreen = factory.findpopup("Test"); factory.consoleprint("Before Async Call Script Method"); objPopupScreen.callscriptmethodparam("showAlert", ["홍길동", ["a", "b"]]); } // ------------------------------------------------------------------------- // 참고: 아래의 내용은 /SAMPLE/API_HELP/Popup 화면의 스크립트 내용입니다. // 파라미터로 넘어온 값을 Alert로 표시 function showAlert(strName, arrData) { screen.alert("Hi! " + strName + ", arrData length = " + arrData.length); return strName; }

See Also

callscriptmethod
callscriptmethodex
findscriptmethod
getmembers

Viewer Ver.

9.1.1.1

Update Date

20220310