readastext API를 통해 파일선택시 호출
Parameters | Type | Description |
---|---|---|
objInst | INSTANCE | 컴포넌트 인스턴스 |
strText | STRING | 문자열 |
Type | Description |
---|---|
void | 없음 |
*파일선택대화상자에서 파일을 선택하지 않고, 취소 또는 닫기를 눌렀을 경우, 두번째 파라미터strText에는 null이 반환되고, 파일정보는 초기화된다.
function readastext_on_mousedown(objInst)
{
file00.readastext(); // 파일 선택대화상자 호출
}
function readastextbyfile_on_mousedown(objInst)
{
if (file00.getfilecount() == 0) {
screen.alert("no files selected");
return;
}
var objFile = file00.getfileobj(0); // 선택된 파일중 첫번째 파일오브젝트
file00.readastext(objFile);
}
function file00_on_readastext(objInst, strText)
{
fld02.settext(strText);
}