title: How to wait for user input in an actor?
body: <p>Is there any way to make an akka actor wait for user input? 
  It seems to just read the command line by itself and keeps getting null.</p>
  
  <p>EDIT: The problematic part of the code added, the problem is that the actor doesn't wait for the readline, rather it attempts to put a null into the variable num:</p>
  
  <pre><code>def chooser: Receive = {
  
      case ChooseRemote =&gt; {
  
          println("Available remotes:&gt; ")
          paths.zipWithIndex.map{ case(x, i) =&gt; "num: " + i + " " + x }.foreach(println)
  
          println("Enter number:&gt; ")
  
          try {
              val num = scala.io.StdIn.readLine().toInt
  
              clientActor ! LookupByLocation(paths(num))
          }
          catch {
  
              case _: Exception =&gt;
              //context.system.scheduler.scheduleOnce(1.second, self, ChooseRemote)
          }
      }
      case Found(actor) =&gt; {
  
          context.become(menu(actor))
  
          context.system.scheduler.scheduleOnce(1.second, self, ChooseMenuItem)
      }
  }
  
  def receive: Receive = chooser
  </code></pre>
  
  <p>EDIT2: The problem manifests when I put: fork in run := true
  in the build.sbt file. </p>