I am trying to follow the radio input example in the Lift book(s), but I cannot get it to work.
Firstly, the example in the book uses this call to the SHtml.radio function SHtml.radio(colorMap.keys.toList, Empty, myColor = colorMap(_)) Using Lift 1.1-SNAPSHOT and Scala 2.7.5 This gives me the error: missing parameter type for expanded function ((x$1) => colorMap(x$1)) "colour" -> radio(colorMap.keys.toList, Empty, myColor = colorMap(_) ) So I change my code to the below: ... var myColor : Color = _ val colorMap = Map("Red" -> Color.red, White" -> Color.white, "Blue" - > Color.blue) def renew(xhtml : NodeSeq) : NodeSeq = { bind("form", xhtml, "colour" -> radio(colorMap.keys.toList, Empty, (a:String) => myColor = colorMap(a) ) ) } ... But this yields the following error: overloaded method value -> with alternatives [T <: net.liftweb.util.Bindable](T with net.liftweb.util.Bindable) net.liftweb.util.Helpers.TheBindableBindParam[T] <and> (Boolean) net.liftweb.util.Helpers.BooleanBindParam <and> (Long) net.liftweb.util.Helpers.LongBindParam <and> (Int) net.liftweb.util.Helpers.IntBindParam <and> (Symbol) net.liftweb.util.Helpers.SymbolBindParam <and> (Option [scala.xml.NodeSeq])net.liftweb.util.Helpers.OptionBindParam <and> (net.liftweb.util.Box[scala.xml.NodeSeq]) net.liftweb.util.Helpers.BoxBindParam <and> ((scala.xml.NodeSeq) => scala.xml.NodeSeq)net.liftweb.util.Helpers.FuncBindParam <and> (Seq [scala.xml.Node])net.liftweb.util.Helpers.TheBindParam <and> (scala.xml.Node)net.liftweb.util.Helpers.TheBindParam <and> (scala.xml.Text)net.liftweb.util.Helpers.TheBindParam <and> (scala.xml.NodeSeq)net.liftweb.util.Helpers.TheBindParam <and> (String) net.liftweb.util.Helpers.TheStrBindParam cannot be applied to (net.liftweb.http.SHtml.ChoiceHolder[String]) "colour" -> radio(colorMap.keys.toList, Empty, (a:String) => myColor = colorMap(a) ) Seems like the bind function doesn't like the ChoiceHolder[String] param (?) What am I doing wrong?! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---