如何在SBT中创建Scala SWT项目?Scala SWT项目与SBT
我知道,你可以使用Git仓库:
RootProject(uri("http://git.eclipse.org/gitroot/platform/eclipse.platform.swt.binaries.git"))
但我不知道是怎么回事,如果是可能的SWT。
在此先感谢, Etam。
编辑:
我不得不手动下载。它编译,但在运行时我得到无效的线程访问错误:
***WARNING: Display must be created on main thread due to Cocoa restrictions.
[error] (run-main) org.eclipse.swt.SWTException: Invalid thread access
即使我使用:
javaOptions := Seq("-XstartOnFirstThread", "-d64")
这是主类:再次
import org.eclipse.swt._
import org.eclipse.swt.layout._
import org.eclipse.swt.widgets._
object Main extends App {
val display = new Display
val shell = new Shell(display)
shell.setLayout(new GridLayout())
shell.pack
shell.open
while (!shell.isDisposed) {
if (!display.readAndDispatch)
display.sleep
}
display.dispose
}
感谢, 艾格。
您是否找到解决此问题的解决方案? – mariosangiorgio 2012-09-19 21:56:57