It's no problem, as I mentioned the compiler error is practically useless.

Hope you get along well, let me know if you have any other issues.

-Ross

On Mar 3, 2010, at 7:29 PM, Craig Blake wrote:

> Yep, that seems to be better.  Sorry for the noise, I don't know why I didn't 
> think to check that.
> 
> Thanks for the quick answer.
> 
> Craig
> 
> On Mar 3, 2010, at 4:44 PM, Ross Mellgren wrote:
> 
>> Unfortunately the compiler error is bizarre (due to some of the type 
>> shuffling involved), but the underlying problem you're experiencing is that 
>> DateTimeFields (and therefore JSONDateTimeFields) have a storage type of 
>> Calendar, and you're trying to assign a Date to them. Try 
>> Calendar.getInstance instead of new Date() and see if that resolves it for 
>> you?
>> 
>> -Ross
>> 
>> On Mar 3, 2010, at 4:32 PM, Craig Blake wrote:
>> 
>>> Hi,
>>> 
>>> I am getting familiar with the lift-couchdb module, and trying to put 
>>> together a sample based on the tests in the module.  Trying to create a 
>>> record, based on this test code:
>>> 
>>>   def testRec1: Person = Person.createRecord.name("Alice").age(25)
>>> 
>>> this is what I have:
>>> 
>>>   class Account extends CouchRecord[Account] {
>>>     def meta = Account
>>>     object created extends JSONDateTimeField(this)
>>>   }
>>>   object Account extends Account with CouchMetaRecord[Account]
>>> 
>>>   ...
>>> 
>>>   val account = Account.createRecord.created(new Date())
>>> 
>>> 
>>> I get a compilation error:
>>> 
>>> [WARNING] Test.scala:44: error: overloaded method value apply with 
>>> alternatives ((net.liftweb.common.Box[_12.MyType])test.Account) forSome { 
>>> val _12: object test.Account#created } <and> ((_13.MyType)test.Account) 
>>> forSome { val _13: object test.Account#created } cannot be applied to 
>>> (java.util.Date)
>>> [WARNING]           val account = Account.createRecord.created( new Date())
>>> 
>>> 
>>> I'm sure that I am just missing something obvious.  Any ideas what?
>>> 
>>> Thanks,
>>> Craig
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Lift" group.
>>> To post to this group, send email to lift...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> liftweb+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/liftweb?hl=en.
>>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Lift" group.
>> To post to this group, send email to lift...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> liftweb+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/liftweb?hl=en.
>> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to