Thanks. I have read everything I could find on this but I think I'm just a bit dense about it. Probably, it's just unfamiliarity with the syntax of Scala as a whole and functional programming in general (or maybe I'm just stupid). Hopefully, at some point the light bulb will come on and this will seem easy. I'll read the blog post.
Chas. David Pollak wrote: > Please also see: > http://blog.lostlake.org/index.php?/archives/50-The-Scala-Option-class-and-how-lift-uses-it.html > > Can[T] is just like Option[T] > > Marius wrote: >> to get stuff out of a can you can do: >> >> 1. Pattern matching >> >> having c a Can[String] >> >> c match { >> case Full(value) => //do something with the value >> case _ => >> } >> >> 2. call open_!(if you're sure your can is not empty) or openOr >> >> Br's, >> Marius >> >> On Oct 15, 3:22 am, "Charles F. Munat" <[EMAIL PROTECTED]> wrote: >> >>> I must be very dense, but these cans are kicking my butt (kicking my >>> can?). No matter what I do, I seem to end up with everything back in the >>> can! I just... want... to get... the goodies... OUT! >>> >>> An example: >>> >>> How do I extract the URI of the current page from S.request? >>> >>> I am currently doing something immensely stupid and wrong like this: >>> >>> S.request.toList.head.location.toList.head.createDefaultLink.toList.head.text >>> >>> I *know* this is way wrong, but I'm not clever enough, apparently, to >>> figure out the puzzle, despite reading through the Can code repeatedly. >>> I figure the above works only because what I'm looking for is there, >>> which sort of defeats the purpose of the cans... >>> >>> Can anyone help? This is driving me insane. >>> >>> Chas. >>> >> >> > > > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---