samples/dialogs/dialog.js
(完整代码) 1016B
function openDialog(file,win,func)
{
var WL=recognizeWinLIKE_(top).WinLIKE; // search for the WinLIKE object
var arr = new Array; // array with information, the dialog window will need to return values
arr[0]=self; // the return frame or window
arr[1]=func; // the return function which will retrieve the values
// here we store the array direct into the myP-property of the dialog window
WL.windows[WL.searchwindow(win)].myP=arr;
// now we open the dialog window--maybe a new window will be created but it has the .myP values anyway
WL.openaddress(file,null,win);
}
function returnVal(val)
{
try
{
var win=recognizeWinLIKE_(top).WinLIKE.windows[getWindowNumber_()]; // this window
// call the function "myP[1]" in the window "myP[0]" with the value "val"
win.myP[0].eval(win.myP[1]+"("+val+")");
win.close(); // now we can close the window
}
catch(everything)
{
alert("return function not found"); // e.g. if the source window is closed meanwhile
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。