Thanks for the info Jorge - thats very helpfull.
We should probally document this in general so that people dont fall foul of it when using addDispatch Cheers, Tim On Oct 19, 5:56 pm, "Jorge Ortiz" <[EMAIL PROTECTED]> wrote: > It's a Scala gotcha, unfortunately. > > Anything you put in the "matching" part of a pattern matching expression > should be side-effect free. (Side effects are things like printing to > screen, writing to files, changing a database, changing global state, etc.) > Because of the way the compiler optimizes pattern matching expressions, it > can't guarantee that they'll only be run once. > > Your second approach is the right one. Put all side-effecting expressions in > the body of the pattern match. > > --j --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
