diff options
author | Philipp Haller <hallerp@gmail.com> | 2006-08-02 09:22:39 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2006-08-02 09:22:39 +0000 |
commit | 73fc9aef1642d014783aaa0b04cca81a8cbbf1a3 (patch) | |
tree | ff797ea234f31d4211fe41ed8dfd70691825192d | |
parent | 474c32c2fdeee811ace7d2ccd7fef9b5cb217b8c (diff) | |
download | scala-73fc9aef1642d014783aaa0b04cca81a8cbbf1a3.tar.gz scala-73fc9aef1642d014783aaa0b04cca81a8cbbf1a3.tar.bz2 scala-73fc9aef1642d014783aaa0b04cca81a8cbbf1a3.zip |
Small clean-ups.
-rw-r--r-- | src/actors/scala/actors/distributed/SystemMessage.scala | 36 | ||||
-rw-r--r-- | src/actors/scala/actors/gui/Button.scala | 2 | ||||
-rw-r--r-- | src/actors/scala/actors/gui/Frame.scala | 2 |
3 files changed, 14 insertions, 26 deletions
diff --git a/src/actors/scala/actors/distributed/SystemMessage.scala b/src/actors/scala/actors/distributed/SystemMessage.scala index 274100f98f..344973e010 100644 --- a/src/actors/scala/actors/distributed/SystemMessage.scala +++ b/src/actors/scala/actors/distributed/SystemMessage.scala @@ -16,30 +16,18 @@ abstract class MessageTyper { type DataType = Array[Byte] } -case class Send(rec: RemotePid, data: MessageTyper#DataType) -case class NamedSend(sym: Symbol, data: MessageTyper#DataType) -case class Spawn(replyto: RemotePid, p: String) -case class SpawnObject(replyto: RemotePid, data: MessageTyper#DataType) -case class Exit1(from: RemotePid, to: RemotePid, reason: Symbol) +abstract class SystemMessage +case class Send(rec: RemotePid, data: MessageTyper#DataType) extends SystemMessage +case class NamedSend(sym: Symbol, data: MessageTyper#DataType) extends SystemMessage +case class Spawn(replyto: RemotePid, p: String) extends SystemMessage +case class SpawnObject(replyto: RemotePid, data: MessageTyper#DataType) extends SystemMessage +case class Exit1(from: RemotePid, to: RemotePid, reason: Symbol) extends SystemMessage -case class RemotePidReply(res: RemotePid) -case class Disconnect() -case class NodeDown() +case class RemotePidReply(res: RemotePid) extends SystemMessage +case class Disconnect() extends SystemMessage +case class NodeDown() extends SystemMessage // CAUTION: Tells "from" to create a _uni-directional_ link! -case class Link(from: RemotePid, to: RemotePid) -case class UnLink(from: RemotePid, to: RemotePid) -case class ForwardExc(destDesc: ExcHandlerDesc, e: Throwable) - -/* -case class NamedSendRep (ser:Serializer) extends TypeRep[NamedSend](ser) { - def serialize(content: NamedSend, w: java.io.Writer): unit = { - StringRep(ser).serialize(content.sym.name, w) - StringRep(ser).serialize(content.data, w) - } - def deserialize(r:java.io.Reader): NamedSend = { - NamedSend(Symbol(StringRep(ser).deserialize(r)), - StringRep(ser).deserialize(r)) - } -} -*/ +case class Link(from: RemotePid, to: RemotePid) extends SystemMessage +case class UnLink(from: RemotePid, to: RemotePid) extends SystemMessage +case class ForwardExc(destDesc: ExcHandlerDesc, e: Throwable) extends SystemMessage diff --git a/src/actors/scala/actors/gui/Button.scala b/src/actors/scala/actors/gui/Button.scala index 99b74d27be..59ae64b9d8 100644 --- a/src/actors/scala/actors/gui/Button.scala +++ b/src/actors/scala/actors/gui/Button.scala @@ -9,7 +9,7 @@ class Button(val jbutton: JButton) extends Container(jbutton) with SwingComponen def this() = this(new JButton()) def text: String = jbutton.getText() def text_=(s: String) = jbutton.setText(s) - def icon: Icon = jbutton.getIcon() + def icon: Icon = jbutton.getIcon() def icon_=(i: Icon) = jbutton.setIcon(i) jbutton.addActionListener { new java.awt.event.ActionListener { diff --git a/src/actors/scala/actors/gui/Frame.scala b/src/actors/scala/actors/gui/Frame.scala index 10b79f54c3..f5269e3d5f 100644 --- a/src/actors/scala/actors/gui/Frame.scala +++ b/src/actors/scala/actors/gui/Frame.scala @@ -9,7 +9,7 @@ class Frame(val jframe: JFrame) extends Container(jframe) with Publisher { def title_=(s: String) = jframe.setTitle(s) val contents = new Container(jframe.getContentPane()) private var default_button: Button = null - def defaultButton = default_button + def defaultButton = default_button def defaultButton_=(b: Button) = { default_button = b; jframe.getRootPane().setDefaultButton(b.jbutton) } def pack: this.type = { jframe.pack(); this } jframe.addWindowListener { |