When are the implicits on a companion object invoked without needing to be
imported?
-
Jeppe Nejsum Madsen wrote:
Naftoli Gugenheim 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
See David's last post on this thread, and the updated diff on RB.
-
Jeppe Nejsum Madsen wrote:
Naftoli Gugenheim 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
Naftoli Gugenheim 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 use the new Conver
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 Pollak wrote:
A ConversionRules singleton is the wrong concept.
What you want is:
case class D
Sounds good!
-
David Pollak 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 = // convert to Java date here
}
obj
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
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 renamed
The basic DI (the stuff Factory/FactoryMaker are built on) are located in
util: see Maker.scala
The Factory stuff is in webkit because it relies on session and request
state. You can change the rules for vending something on a
session-by-session and request-by-request basis.
LiftRules is the sin
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
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 do
10 matches
Mail list logo