【发布时间】:2016-06-16 13:49:06
【问题描述】:
我写了一个swing应用程序,想在里面创建一个Alignment类的对象。但是当我尝试执行此操作时,我收到此错误消息:“无法解析符号对齐”。有人可以向我解释我做错了什么吗?
这是我的代码:
package scala.swing
package test
import event._
object Pite extends SimpleSwingApplication {
def top = new MainFrame {
val seq1Label = new Label("Insert First Sequence")
val seq2Label = new Label("Insert Second Sequence")
val seq1 = new TextArea("Input")
val seq2 = new TextArea("Input")
var gap = new ComboBox(List(1,2,3,4)) { makeEditable() }
var scoringMatrix = new ComboBox(List("BLOSUM62.txt","BLOSUM50.txt","BLOSUM100.txt"))
val button = new Button("RUN")
val ali = new TextArea{
text = "test"
listenTo(button)
reactions += {
case ButtonClicked(`button`) =>
val gapVal = gap.selection.item
val seq1container = seq1.text
val seq2container = seq2.text
val SMcontainer = scoringMatrix.selection.item
val proteins = new Alignment(seq1container,seq2container,gapVal,SMcontainer)
text = proteins.aligning
}
}
contents = new BoxPanel(Orientation.Vertical) { contents.append(seq1Label,seq1,seq2Label,seq2,scoringMatrix,gap,ali,button) }
}
}
【问题讨论】: