Làm thế nào để bạn tạo dự án Scala SWT trong SBT?Dự án Scala SWT với SBT
Tôi biết rằng bạn có thể sử dụng kho GIT:
RootProject(uri("http://git.eclipse.org/gitroot/platform/eclipse.platform.swt.binaries.git"))
Nhưng tôi không biết làm thế nào và nếu nó là có thể với SWT.
Xin cảm ơn trước, Etam.
EDIT:
tôi phải tải nó bằng tay. Nó biên dịch nhưng khi chạy tôi nhận được không hợp lệ lỗi truy cập chủ đề:
***WARNING: Display must be created on main thread due to Cocoa restrictions.
[error] (run-main) org.eclipse.swt.SWTException: Invalid thread access
Thậm chí nếu tôi sử dụng:
javaOptions := Seq("-XstartOnFirstThread", "-d64")
Đây là lớp học chính:
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
}
Cảm ơn một lần nữa, Etam.
Bạn có tìm thấy giải pháp cho vấn đề này không? – mariosangiorgio