[Lift] Re: Snippets; having trouble with a simple example
On Wed, Apr 8, 2009 at 4:13 PM, Douglas F Shearer wrote: > > I've found the solution to this. It seems that for some reason I > needed to provide the return type on the posts method, as so: > > def posts(html: NodeSeq): NodeSeq = { > ... > > Odd it should fail in such a manner without it, I would expect the > return type to be inferred by the compiler, or an error given. The type inferencer determines the type to be List[Node]. Lift's convention is that it looks for NodeSeq (it's hard to do pattern matching on List[Node] because of type erasure) so you have to explicitly define the return type. > > > Thanks. > > On Apr 8, 9:10 pm, Douglas F Shearer wrote: > > Hi there. > > > > I'm having issues with a simple snippets example. > > > > The error, view and template can be seen here: > http://gist.github.com/91971 > > > > I'm sure it's a trivial issue, my code seems identical to the example > > given in the Getting Started PDF. > > > > Help is much appreciated. > > > > Thanks. > > > > Douglas F Shearer > > douga...@gmail.comhttp://douglasfshearer.com > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Lift] Re: Snippets; having trouble with a simple example
I've found the solution to this. It seems that for some reason I needed to provide the return type on the posts method, as so: def posts(html: NodeSeq): NodeSeq = { ... Odd it should fail in such a manner without it, I would expect the return type to be inferred by the compiler, or an error given. Thanks. On Apr 8, 9:10 pm, Douglas F Shearer wrote: > Hi there. > > I'm having issues with a simple snippets example. > > The error, view and template can be seen here:http://gist.github.com/91971 > > I'm sure it's a trivial issue, my code seems identical to the example > given in the Getting Started PDF. > > Help is much appreciated. > > Thanks. > > Douglas F Shearer > douga...@gmail.comhttp://douglasfshearer.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Lift] Re: Snippets; having trouble with a simple example
Hi, What happens when you do a clean build? Do you still get the error? Are you getting any snippet failure errors in the console when jetty is running? Thanks, Tim On Apr 8, 9:10 pm, Douglas F Shearer wrote: > Hi there. > > I'm having issues with a simple snippets example. > > The error, view and template can be seen here:http://gist.github.com/91971 > > I'm sure it's a trivial issue, my code seems identical to the example > given in the Getting Started PDF. > > Help is much appreciated. > > Thanks. > > Douglas F Shearer > douga...@gmail.comhttp://douglasfshearer.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---