Yup
-
José María wrote:
OMG
So, as -> begins with "-" then it has the precedence of the operator
-
On Sep 8, 7:52 pm, Naftoli Gugenheim wrote:
> Precedence is determined by the first character of an operator.
>
> -
OMG
So, as -> begins with "-" then it has the precedence of the operator
-
On Sep 8, 7:52 pm, Naftoli Gugenheim wrote:
> Precedence is determined by the first character of an operator.
>
> -
>
> Ross Mellgren wrote:
>
> Because the compiler interpret yo
Precedence is determined by the first character of an operator.
-
Ross Mellgren wrote:
Because the compiler interpret your expression as you expect. Instead
of:
"url_enlace" -> ("/product/" + product.id.toString)
which is what you wanted, it got:
("url_e
Operators starting with - and + have the same precendence so they are combined
left to right. Thus you are concatenating a BindParam with a String, returning
a String.
-
José María wrote:
It worked when I put the () around the bind param
and the questi
Because the compiler interpret your expression as you expect. Instead
of:
"url_enlace" -> ("/product/" + product.id.toString)
which is what you wanted, it got:
("url_enlace" -> "/product/") + product.id.toString)
which it can do because it can take an arbitrary object:
("url_enlace" -> "/pr
It worked when I put the () around the bind param
and the question is ... why?
On Sep 8, 7:35 pm, Ross Mellgren wrote:
> So that doesn't seem to be a box-related thing so much as a bind
> argument related thing, probably because you have a precedence
> problem... try:
>
> producto.ma
I adapted the code but not the error, Producto is Product in Spanish.
On Sep 8, 7:35 pm, Ross Mellgren wrote:
> So that doesn't seem to be a box-related thing so much as a bind
> argument related thing, probably because you have a precedence
> problem... try:
>
> producto.map(product =>
>
So that doesn't seem to be a box-related thing so much as a bind
argument related thing, probably because you have a precedence
problem... try:
producto.map(product =>
bind("product", xhtml,
"url_enlace" -> ("/product/" + product.id.toString),
)
).openOr(NodeSeq.Empty)
Also
That's my code:
val product = Product.find(id)
producto.map(product =>
bind("product", xhtml,
"url_enlace" --> "/product/" + product.id.toString ,
)
).openOr(NodeSeq.Empty)
}
and I get this error:
[INFO] use java command with args in file
Well it depends on precisely what you want. If you want your snippet
to become empty if the product is not there, try:
productBox.map(product => {
bind("product", ns, ...)
}).openOr(NodeSeq.Empty)
If you want only certain bind positions empty, do the same thing
inside the bind:
bind("pro
There should be implicits that allow you to bind to a Box of a NodeSeq, so you
can bind to prodBox.map(_.toForm). Otherwise bind to
prodBox.map(_.toForm).openOr(NodeSeq.Empty) etc.
-
José María wrote:
Hi.
Boxes are giving me a hard time.
Say you have a mo
11 matches
Mail list logo