如何使用 JSL 编辑模式对话框窗口通过 JSL 编辑模态对话框的正确方法是什么?
想法:
- 功能添加更新按钮,在数据过滤器中添加按钮
- 如果在窗口创建后执行,则有效
- in the actual use case, the return value of the window is used as input for the subsequent code.
Therefore, <<TYPE><BR /> -> 在<FONT face="courier new,courier">添加更新按钮()//post</FONT>执行之前窗口将被关闭</TYPE>
- I tried to add the <FONT face="courier new,courier">添加更新按钮()</FONT> via <FONT face="courier new,courier"><< 打开 (<BR /></FONT>... without success
<CODE class=" language-jsl">Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Add Properties to Table(
{New Script("reread", JSL Quote(caption("reread ...")), As String( 1 ))});
add update button = function ({},
wait();
Current Report()["Local Data Filter",LineUpBox(1)] <<
append(
b = Button Box( "update",
b << close window();
dt << run script( "reread" );
ShowQueryWindow();
)
));
ShowQueryWindow = Function({},
gui = New Window( "test",
//<<TYPE></TYPE><CODE class=" language-jsl"><LINGO-LABS id="lingo-labs-750202" slang="en-US" mode="UPDATE"><LINGO-LABEL>自动化和脚本</LINGO-LABEL></LINGO-LABS>回复:如何使用 JSL 编辑模式对话框窗口在 JMP 18 中,实现此目的的一种方法是使用窗口处理程序。窗口处理程序是一个函数包装器,允许您访问在执行函数期间创建的任何窗口。我们正在考虑在即将发布的主要版本中使模态和非模态行为更加一致,这将使将来更容易通过 New Window() 函数直接实现这一点。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Add Properties to Table(
{New Script("reread", JSL Quote(caption("reread ...")), As String( 1 ))});
add update button = function ({win},
win["Local Data Filter",LineUpBox(1)] <<
append(
b = Button Box( "update",
b << close window();
dt << run script( "reread" );
ShowQueryWindow();
)
));
showFilter = Function({},
With Window Handler(
New Window( "test",
<<TYPE></TYPE>
<P> </P>
<P> </P>回复:如何使用 JSL 编辑模式对话框窗口你好@danschikore ,非常感谢
精彩的:)
回复:如何使用 JSL 编辑模式对话框窗口您是否尝试将更新按钮添加到模态窗口?如果是,我不认为模态窗口是报告窗口(它是模态或模态对话框)-> 以不同的方式构建模态窗口
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << New Script("reread", JSL Quote(caption("reread ...")), As String(1));
add update button = Function({ref},
ref["Local Data Filter", Lineup Box(1)] << append(
b = Button Box("update",
b << close window();
dt << run script("reread");
)
);
);
showFilter = Function({},
collector = V List Box(
dt << data filter(local)
);
add update button(collector);
gui = New Window("test", <<TYPE></TYPE>
<P>我还建议尝试向您的函数添加{Default Local}(或定义的变量名)以避免可能出现的问题,但这需要一些额外的脚本。</P>