sbt:lift-framework:2.5-SNAPSHOT> lift-util/console
[warn] Credentials file /home/naftoli/.sbt/.credentials does not exist
[warn] Credentials file /home/naftoli/.sbt/.credentials does not exist
[warn] Credentials file /home/naftoli/.sbt/.credentials does not exist
[warn] Credentials file /home/naftoli/.sbt/.credentials does not exist
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.10.0-M7 (OpenJDK 64-Bit Server VM, Java 1.7.0_07).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import net.liftweb.util._
import net.liftweb.util._
scala> CssSelectorParser
res0: net.liftweb.util.CssSelectorParser.type = net.liftweb.util.CssSelectorParser$@26a5ef1d
scala> CssSelectorParser("button")
<console>:11: error: net.liftweb.util.CssSelectorParser.type does not take parameters
CssSelectorParser("button")
^
scala> CssSelectorParser parse ("button")
res2: net.liftweb.common.Box[net.liftweb.util.CssSelector] = Empty
scala> CssSelectorParser parse ("#button")
res3: net.liftweb.common.Box[net.liftweb.util.CssSelector] = Empty
scala> "button" #> "xxx"
<console>:11: error: value #> is not a member of String
"button" #> "xxx"
^
scala> import Helpers._
import Helpers._
scala> "button" #> "xxx"
res5: net.liftweb.util.CssSel = CssBind(Full(button), Empty)
scala> res5 apply <button/>
res6: scala.xml.NodeSeq =
<div class="snippeterror" style="display: block; padding: 4px; margin: 8px; border: 2px solid red">
<div>
Syntax error in CSS selector definition:
button
.
The selector will not be applied.
</div>
<i>note: this error is displayed in the browser because
your application is running in "development" or "test" mode.If you
set the system property run.mode=production, this error will not
be displayed, but there will be errors in the output logs.
</i>
</div>
scala> new ToCssBindPromoter(Full(str), CssSelectorParser.parse(str))
<console>:14: error: not found: value Full
new ToCssBindPromoter(Full(str), CssSelectorParser.parse(str))
^
<console>:14: error: not found: value str
new ToCssBindPromoter(Full(str), CssSelectorParser.parse(str))
^
scala> val str = "button"
str: String = button
scala> new ToCssBindPromoter(Full(str), CssSelectorParser.parse(str))
<console>:15: error: not found: value Full
new ToCssBindPromoter(Full(str), CssSelectorParser.parse(str))
^
scala> import net.liftweb.common._
import net.liftweb.common._
scala> new ToCssBindPromoter(Full(str), CssSelectorParser.parse(str))
res9: net.liftweb.util.ToCssBindPromoter = ToCssBindPromoter(Full(button),Empty)
scala> res9 #> "xxx"
res10: net.liftweb.util.CssSel = CssBind(Full(button), Empty)
scala> res10 apply <button/>
res11: scala.xml.NodeSeq =
<div class="snippeterror" style="display: block; padding: 4px; margin: 8px; border: 2px solid red">
<div>
Syntax error in CSS selector definition:
button
.
The selector will not be applied.
</div>
<i>note: this error is displayed in the browser because
your application is running in "development" or "test" mode.If you
set the system property run.mode=production, this error will not
be displayed, but there will be errors in the output logs.
</i>
</div>
scala> res10 calculate <button/>
<console>:20: error: value calculate is not a member of net.liftweb.util.CssSel
res10 calculate <button/>
^
scala> res10.asInstanceOf[CssBind] calculate <button/>
res13: Seq[scala.xml.NodeSeq] = List(xxx)