Search code examples
scalaplayframeworkwebsocketactorchatroom

Error not found value context?


def join(username: String): scala.concurrent.Future[(Iteratee[JsValue, _], Enumerator[JsValue])] = {
  println("friend name in model" + username)
  val first = Akka.system.actorOf(Props[ChatRoom2], name = username)
  println("this is chat room two default")
}    

and when i use this val first = context.actorOf(Props[ChatRoom2],name=username)

I am use this for create a child actor in a different chat room but it shows an error not found value context.


Solution

  • import akka.actor

    Refer this url https://groups.google.com/forum/#!msg/akka-user/4eYJWKWhAe8/TTAIOAI-uaIJ