Chat class Chat extends Comet Actor with Comet Slides: 11 Download presentation Chat コンポーネントの定義 class Chat extends Comet. Actor with Comet. Listener { private var msgs: List[String] = Nil def register. With = Chat. Server override def low. Priority = { case m: List[String] => msgs = m; re. Render(false) } import scala. xml. Node. Seq def render = bind("chat", // バインディングのための名前空間 "line" -> lines _, // 関数 lines をバインド "input" -> SHtml. text("", s => Chat. Server ! s)) private def lines(xml: Node. Seq): Node. Seq = msgs. reverse. flat. Map(m => bind("chat", xml, "msg" -> m)) } 解説は次ページ Index. htmlの中身 <lift: surround with="default" at="content"> <lift: comet type="Chat"> <ul> <chat: line> <li><chat: msg/></li> </chat: line> </ul> <lift: form> <chat: input/> <input type="submit" value="chat"/> </lift: form> </lift: comet> </lift: surround> Bug extends Actor but differs from Actor inextends class Car extends Vehicle class contents SeeInheritance modifiers class Class Name extends Existing ClassImmersive actor feedback system What sees the actorActor Languages Maher Motivation Actor system Bill CommunicationUML Actor Myuser Actor Customer Care Database databaseactor SQL INSERT INTO actor id name birthdayActors actor composition and an actor language describingActor Frame Visualisation Background n n n ActorALS MICROSCOPES VIEW A COMET Particles from CometIntroducing Comet Lib l What is Comet Lib