I'm in the process of playing with the Record code so I have some examples
for the book. I've run into two small issues:
1. I'm writing a custom Field type (DecimalField) and it seems like the
valueCouldNotBeSet var should be set if I can't parse the decimal string
that a user hands me in setFromString. That var, however, is marked
private[record], so I can't actually access it. Could you provide an
accessor or make that var protected so that I can set it?
2. I'm getting a really weird type error if I try to override the
fieldOrder def on MetaRecord:
[WARNING]
/home/software/liftbook-demos/demo-record/src/main/scala/com/theliftbook/model/Entry.scala:50:
error: type mismatch;
[WARNING] found :
List[net.liftweb.record.Field[_10,com.theliftbook.model.Entry] forSome {
type _10 >: String with java.util.Calendar <: java.lang.Comparable[_1]
forSome { type _1 >: java.lang.String with java.util.Calendar <:
java.io.Serializable } with java.io.Serializable }{def defaultValue:
java.lang.Comparable[_12] forSome { type _12 >: java.lang.String with
java.util.Calendar <: java.io.Serializable } with java.io.Serializable}]
[WARNING] required:
List[net.liftweb.record.Field[_$3,com.theliftbook.model.Entry] forSome {
type _$3 }]
[WARNING] override def fieldOrder = date :: description :: Nil
Here's my code:
class Entry extends Record[Entry] {
def meta = EntryMeta
object date extends DateTimeField(this)
object description extends StringField(this, 100)
}
object EntryMeta extends Entry with MetaRecord[Entry] {
override def fieldOrder = date :: description :: Nil
}
Am I making a dumb mistake here, or is there some other weirdness going on?
Thanks,
Derek
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---