On 02/10/2010 11:18 AM, Naftoli Gugenheim wrote:
If adding .toSeq or a : NodeSeq type annotation don't trigger the implicit,
wrap it with NodeSeq.fromSeq(...).
Also, you can do
...flatMap{case (_, account) => bindAccountFields(in, account, false)}
Cool. I made the following changes, but still get the same error:
user.accounts.isEmpty match {
case true => <p>You have no accounts configured.</p>
case false => user.accounts.flatMap({
case (_, account) => NodeSeq.fromSeq(
bindAccountFields(in, account, false)
)
})
}
[error]
/home/nolan/Projects/Utterance2/src/main/scala/info/thewordnerd/utterance/snippet/Manage.scala:67:
type mismatch;
[error] found : Iterable[scala.xml.Node]
[error] required: scala.xml.NodeSeq
[error] case false => user.accounts.flatMap({
[error] ^
[error] one error found
Thanks for the partial function tip. I'm starting to learn some of
Scala's more functional corners and recently read up on those, but
didn't think to use them there.
--
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en.