The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

reyjb (1) [Avatar] Offline
#1
Bought the book at amazon few weeks ago and just started reading.


There's however code sample which should work on scala 2.10 but not working on console. Here's the full log on console:

play! 2.1.2 (using Java 1.7.0_21 and Scala 2.10.0), http://www.playframework.org

> Type "help play" or "license" for more information.
> Type "exit" or use Ctrl+D to leave this console.

[MyProject] $ var willKnowLater:String = _
[error] Not a valid key: var (similar: run, target)
[error] var willKnowLater:String = _
[error] ^
[MyProject] $

Any ideas why this is not working as I was very excited about testing re-factoring my code and using this.
nraychaudhuri (19) [Avatar] Offline
#2
Re: 2.2.2 Defining variables (page 29) - Incorrect code sample
wait you are trying this out in sbt console. You probably have figured out already. If its sbt/play prompt you need to type in console and then try the scala statement out.