Re: [Lift] The role of LiftRules

2010-03-03 Thread Naftoli Gugenheim
See David's last post on this thread, and the updated diff on RB. - Jeppe Nejsum Madsenje...@ingolfs.dk wrote: Naftoli Gugenheim naftoli...@gmail.com writes: Would it be a bad idea to use java.util.Date for now, and if and when support is added for

Re: [Lift] The role of LiftRules

2010-03-03 Thread Naftoli Gugenheim
When are the implicits on a companion object invoked without needing to be imported? - Jeppe Nejsum Madsenje...@ingolfs.dk wrote: Naftoli Gugenheim naftoli...@gmail.com writes: Would it be a bad idea to use java.util.Date for now, and if and when support

Re: [Lift] The role of LiftRules

2010-03-02 Thread Naftoli Gugenheim
Would it be a bad idea to use java.util.Date for now, and if and when support is added for JodaTime, change it to a DateHolder (which would be added then)? - David Pollakfeeder.of.the.be...@gmail.com wrote: A ConversionRules singleton is the wrong concept.

Re: [Lift] The role of LiftRules

2010-03-02 Thread Jeppe Nejsum Madsen
Naftoli Gugenheim naftoli...@gmail.com writes: Would it be a bad idea to use java.util.Date for now, and if and when support is added for JodaTime, change it to a DateHolder (which would be added then)? Haven't looked in detail, but wouldn't this require two changes to client code? 1) One to

Re: [Lift] The role of LiftRules

2010-02-26 Thread Naftoli Gugenheim
Oh, right--I forgot about per-session and request. So what do you vote on this, then: A. ConversionRules is its own singleton, but as a bonus it can also be accessed from LiftRules. B. Same as A but ConversionRules is private[liftweb], so there's only one path. C. Less redundant: define (a

Re: [Lift] The role of LiftRules

2010-02-26 Thread David Pollak
A ConversionRules singleton is the wrong concept. What you want is: case class DateHolder(date: JodaTime) { implicit def asJt: JodaTime = date implicit def asJavaDate: java.util.Date = // convert to Java date here } object DateHolder { implicit def dateToDH(in: java.util.Date): DateHolder

Re: [Lift] The role of LiftRules

2010-02-26 Thread Naftoli Gugenheim
Sounds good! - David Pollakfeeder.of.the.be...@gmail.com wrote: A ConversionRules singleton is the wrong concept. What you want is: case class DateHolder(date: JodaTime) { implicit def asJt: JodaTime = date implicit def asJavaDate: java.util.Date = //

[Lift] The role of LiftRules

2010-02-25 Thread Naftoli Gugenheim
Hi, I'd like to get some opinions on the following. You may want to read http://reviewboard.liftweb.net/r/158/. I have on Review Board a patch for some date-and-time parsing and formatting configuration. I put the settings inside a singleton object called ConversionRules. The question is, where

Re: [Lift] The role of LiftRules

2010-02-25 Thread Ross Mellgren
We were talking in another thread about having something kind of similar to this where the configuration is held in lift-util (maybe lift-common) but it is accessible through LiftRules. I think it could be a good idea to do this for this as well, to help guide people to the right place for this