tjweir / pocketchangeapp

Demo Application for the Lift Book.
http://www.theliftbook.com
75 stars 29 forks source link

compile error in RestAPI.scala - No implicit view available #11

Open zachariahkral opened 12 years ago

zachariahkral commented 12 years ago

Lift version 2.4 M4 IDE: netbeans 7.0.1

Errors on line 164 and 170: No implicit view available

serveJx { case Get(List("api", "expense", Expense(expense,)), ) => Full(expense) }

// Just an example of autoconversion serveJx { case Get(List("api", "greet", name),_) => auto(Map("greeting" -> Map("who" -> name, "what" -> ("Hello at " + new java.util.Date)))) }

as per this thread I gave the first block a hint [Expense] and it solved the issue https://groups.google.com/group/liftweb/browse_thread/thread/29013d61462eae71/344376131a2caab4?lnk=gst&q=I%27m+trying+to+expose+some+data+through+REST+using+lift#344376131a2caab4

serveJx[Expense] { case Get(List("api", "expense", Expense(expense,)), ) => Full(expense) }

the second (example of autoconversion), since I haven't gotten that far in the book, I just deleted. After those two changes, the whole project compiled.