随笔 - 232
文章 - 0
评论 - 26
阅读 -
38万
06 2013 档案
eval()函数使用
摘要:条件:有数据集data[indx],数据集内含有对象data[index].obj1.pama1。 说明:传入参数为var str = 'obj1.pama1',要求取得data[index].obj1.pama1的值。 解决方式:由于忘记了eval()函数,导致浪费很长时间。var val = eval("data[index]."+str)即可。但要求存在data[index]对象
阅读全文
JFace下ApplicationWindow关闭窗口时结束进程
摘要:/** * Configure the shell. * @param newShell */ @Override protected void configureShell(Shell newShell) { super.configureShell(newShell); newShell.addListener(SWT.Close, new Listener() { public void handleEvent(Event event) { System.exit(0);...
阅读全文