Skip to content

Commit

Permalink
assume nodeSeq, possible a seq of 'something', otherwise we don't rea…
Browse files Browse the repository at this point in the history
…lly know
  • Loading branch information
softprops committed Nov 30, 2011
1 parent f1880ff commit 0a9b781
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/main/scala/collaboration.scala
Expand Up @@ -29,9 +29,14 @@ class CollaborationPlan(drawingActor: Actor)
// get the current state
val future = drawingActor !! FetchDrawing(id)
future() match {
case fullSvg: Seq[String] =>
println("pulled svg info %s" format fullSvg)
fullSvg.foreach(s.send)
case xmlSvg: scala.xml.NodeSeq =>
println("pulled svg info %s" format xmlSvg)
xmlSvg.foreach(svg => s.send(svg.toString))
case strs: Seq[_] =>
println("actor responded with %s" format strs)
strs.foreach(str => s.send(str.toString))
case other =>
println("actor responded with unhandled msg %s" format other)
}

case Message(s, Text(txt)) =>
Expand Down

0 comments on commit 0a9b781

Please sign in to comment.