[Lift] scaladocs

2009-12-01 Thread E. Biggs
should http://scala-tools.org/mvnsites-snapshots/liftweb/scaladocs/index.html
be something other than nothing?

Is there a better way to get snapshot scaladocs?

--

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.




[Lift] Re: scaladocs

2009-12-01 Thread E. Biggs
hi, thanks.. i'm looking for the API documentation???

On Dec 1, 5:08 pm, Ross Mellgren dri...@gmail.com wrote:
 Tryhttp://scala-tools.org/mvnsites-snapshots/liftweb/instead of with 
 index.html

 -Ross

 On Dec 1, 2009, at 8:01 PM, E. Biggs wrote:



  shouldhttp://scala-tools.org/mvnsites-snapshots/liftweb/scaladocs/index.html
  be something other than nothing?

  Is there a better way to get snapshot scaladocs?

  --

  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 
  athttp://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.




[Lift] Re: 1.1-SNAPSHOT issue?

2009-08-27 Thread E. Biggs

Ok here's the problem stripped down. The merge happens but the head
node isn't being removed from the body
Let me know if you'd like it in some other format.

templates-hidden/outer.html:

html
  head
  meta name=description content=Head Merge Test /
  /head
  body
lift:bind name=content /
  /body
/html


inner.html:

lift:surround with=outer at=content
  head
titleInner/title
  /head
/lift:surround

renders:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
html
head
  meta content=Head Merge Test name=description /


titleInner/title


script type=text/javascript src=/ajax_request/liftAjax.js/
script
/head
body

  head
titleInner/title
  /head



script type=text/javascript
// ![CDATA[
jQuery(document).ready(function() {liftAjax.lift_successRegisterGC
();});
var lift_page = F9839766178183WH;
// ]]
/script/body
/html


On Aug 26, 9:58 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Wed, Aug 26, 2009 at 8:32 PM, E. Biggs tacoban...@gmail.com wrote:

  Thanks David! My pages now render - although broken...  the cause
  appears to be a failed head merge between my template's head and the
  surrounding template's head.

 Can you post an example of the failing use case and I'll roll it into our
 tests and get it works?







  On Aug 26, 7:51 pm, David Pollak feeder.of.the.be...@gmail.com
  wrote:
   I've just pushed a new version live that will behave more gracefully if
  the
   xsd cannot be loaded.

   On Wed, Aug 26, 2009 at 7:39 PM, Justin Reardon 
  justin.rear...@gmail.comwrote:

Probably caused by this if you're in a dev environment:
   http://groups.google.com/group/liftweb/t/90750187a6c29c2c

On Aug 26, 9:36 pm, E. Biggs tacoban...@gmail.com wrote:
 Hi there,

 I just did a mvn -U jetty:run

 and my site that I know was working fine before is now broken with
 this error displayed in the browser for any url:

 org.xml.sax.SAXParseException: schema_reference.4: Failed to read
 schema document 'http://www.w3.org/2002/08/xhtml/xhtml1-
 transitional.xsd', because 1) could not find the document; 2) the
 document could not be read; 3) the root element of the document is
  not
 xsd:schema.

  com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseE
xception
 (ErrorHandlerWrapper.java:236)

  com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error
 (ErrorHandlerWrapper.java:172)

com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError
 (XMLErrorReporter.java:382)

com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError
 (XMLErrorReporter.java:316)

  com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSche
maError
 (XSDHandler.java:2245)

  com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchema
 (XSDHandler.java:1590)

  com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchem
a
 (XSDHandler.java:438)

com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema
 (XMLSchemaLoader.java:556)

com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar
 (XMLSchemaLoader.java:523)

  com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl.new
Schema
 (SchemaFactoryImpl.java:206)

javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:489)

javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:521)
         net.liftweb.http.GenericValidtor.schema(LiftRules.scala:1116)
         net.liftweb.http.GenericValidtor.apply(LiftRules.scala:1119)
         net.liftweb.http.GenericValidtor.apply(LiftRules.scala:1101)

net.liftweb.http.LiftSession$$anonfun$8.apply(LiftSession.scala:607)

net.liftweb.http.LiftSession$$anonfun$8.apply(LiftSession.scala:607)
         scala.List.flatMap(List.scala:1132)
         net.liftweb.http.LiftSession.net
  $liftweb$http$LiftSession$$merge
 (LiftSession.scala:607)

  net.liftweb.http.LiftSession$$anonfun$10$$anonfun$apply$30.apply
 (LiftSession.scala:717)

  net.liftweb.http.LiftSession$$anonfun$10$$anonfun$apply$30.apply
 (LiftSession.scala:714)
         net.liftweb.util.EmptyBox.or(Box.scala:374)

net.liftweb.http.LiftSession$$anonfun$10.apply(LiftSession.scala:711)

net.liftweb.http.LiftSession$$anonfun$10.apply(LiftSession.scala:704)
         net.liftweb.util.EmptyBox.or(Box.scala:374)

net.liftweb.http.LiftSession.processRequest(LiftSession.scala:704)
 ---SNIP---

 Anybody else getting this? Or know what the problem could be?

   --
   Lift, the simply functional web frameworkhttp://liftweb.net
   Beginning Scalahttp://www.apress.com/book/view/1430219890
   Follow me:http://twitter.com/dpp
   Git some:http://github.com/dpp

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning

[Lift] Re: 1.1-SNAPSHOT issue?

2009-08-27 Thread E. Biggs

Many thanks!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] 1.1-SNAPSHOT issue?

2009-08-26 Thread E. Biggs

Hi there,

I just did a mvn -U jetty:run

and my site that I know was working fine before is now broken with
this error displayed in the browser for any url:

org.xml.sax.SAXParseException: schema_reference.4: Failed to read
schema document 'http://www.w3.org/2002/08/xhtml/xhtml1-
transitional.xsd', because 1) could not find the document; 2) the
document could not be read; 3) the root element of the document is not
xsd:schema.

com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException
(ErrorHandlerWrapper.java:236)
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error
(ErrorHandlerWrapper.java:172)
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError
(XMLErrorReporter.java:382)
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError
(XMLErrorReporter.java:316)

com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError
(XSDHandler.java:2245)

com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchema
(XSDHandler.java:1590)

com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema
(XSDHandler.java:438)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema
(XMLSchemaLoader.java:556)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar
(XMLSchemaLoader.java:523)

com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl.newSchema
(SchemaFactoryImpl.java:206)
javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:489)
javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:521)
net.liftweb.http.GenericValidtor.schema(LiftRules.scala:1116)
net.liftweb.http.GenericValidtor.apply(LiftRules.scala:1119)
net.liftweb.http.GenericValidtor.apply(LiftRules.scala:1101)
net.liftweb.http.LiftSession$$anonfun$8.apply(LiftSession.scala:607)
net.liftweb.http.LiftSession$$anonfun$8.apply(LiftSession.scala:607)
scala.List.flatMap(List.scala:1132)
net.liftweb.http.LiftSession.net$liftweb$http$LiftSession$$merge
(LiftSession.scala:607)
net.liftweb.http.LiftSession$$anonfun$10$$anonfun$apply$30.apply
(LiftSession.scala:717)
net.liftweb.http.LiftSession$$anonfun$10$$anonfun$apply$30.apply
(LiftSession.scala:714)
net.liftweb.util.EmptyBox.or(Box.scala:374)
net.liftweb.http.LiftSession$$anonfun$10.apply(LiftSession.scala:711)
net.liftweb.http.LiftSession$$anonfun$10.apply(LiftSession.scala:704)
net.liftweb.util.EmptyBox.or(Box.scala:374)
net.liftweb.http.LiftSession.processRequest(LiftSession.scala:704)
---SNIP---

Anybody else getting this? Or know what the problem could be?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: 1.1-SNAPSHOT issue?

2009-08-26 Thread E. Biggs

Thanks David! My pages now render - although broken...  the cause
appears to be a failed head merge between my template's head and the
surrounding template's head.

On Aug 26, 7:51 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 I've just pushed a new version live that will behave more gracefully if the
 xsd cannot be loaded.

 On Wed, Aug 26, 2009 at 7:39 PM, Justin Reardon 
 justin.rear...@gmail.comwrote:







  Probably caused by this if you're in a dev environment:
 http://groups.google.com/group/liftweb/t/90750187a6c29c2c

  On Aug 26, 9:36 pm, E. Biggs tacoban...@gmail.com wrote:
   Hi there,

   I just did a mvn -U jetty:run

   and my site that I know was working fine before is now broken with
   this error displayed in the browser for any url:

   org.xml.sax.SAXParseException: schema_reference.4: Failed to read
   schema document 'http://www.w3.org/2002/08/xhtml/xhtml1-
   transitional.xsd', because 1) could not find the document; 2) the
   document could not be read; 3) the root element of the document is not
   xsd:schema.

  com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseE
  xception
   (ErrorHandlerWrapper.java:236)
           com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error
   (ErrorHandlerWrapper.java:172)

  com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError
   (XMLErrorReporter.java:382)

  com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError
   (XMLErrorReporter.java:316)

  com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSche
  maError
   (XSDHandler.java:2245)

  com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchema
   (XSDHandler.java:1590)

  com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchem
  a
   (XSDHandler.java:438)

  com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema
   (XMLSchemaLoader.java:556)

  com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar
   (XMLSchemaLoader.java:523)

  com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl.new
  Schema
   (SchemaFactoryImpl.java:206)

  javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:489)

  javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:521)
           net.liftweb.http.GenericValidtor.schema(LiftRules.scala:1116)
           net.liftweb.http.GenericValidtor.apply(LiftRules.scala:1119)
           net.liftweb.http.GenericValidtor.apply(LiftRules.scala:1101)

  net.liftweb.http.LiftSession$$anonfun$8.apply(LiftSession.scala:607)

  net.liftweb.http.LiftSession$$anonfun$8.apply(LiftSession.scala:607)
           scala.List.flatMap(List.scala:1132)
           net.liftweb.http.LiftSession.net$liftweb$http$LiftSession$$merge
   (LiftSession.scala:607)
           net.liftweb.http.LiftSession$$anonfun$10$$anonfun$apply$30.apply
   (LiftSession.scala:717)
           net.liftweb.http.LiftSession$$anonfun$10$$anonfun$apply$30.apply
   (LiftSession.scala:714)
           net.liftweb.util.EmptyBox.or(Box.scala:374)

  net.liftweb.http.LiftSession$$anonfun$10.apply(LiftSession.scala:711)

  net.liftweb.http.LiftSession$$anonfun$10.apply(LiftSession.scala:704)
           net.liftweb.util.EmptyBox.or(Box.scala:374)

  net.liftweb.http.LiftSession.processRequest(LiftSession.scala:704)
   ---SNIP---

   Anybody else getting this? Or know what the problem could be?

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: Mega*ProtoUser extensibility - a suggestion.

2009-08-05 Thread E. Biggs

David,

First apologies for accidently taking this thread off the lift group.
It was entirely accidental.

So my question with regards to the scala language that I can't seem to
find an answer for online anywhere is what exactly is an object nested
inside a class i.e. :

class ObjectWrapper {
  object obj extends AnyRef{var prop = prop}
}

versus a class with a final val that's set to an instance of an
anonymous class i.e. :

class AnonClassWrapper{
  final val obj = new AnyRef{var prop=prop}
}

I've tried to discover some sort of behavioral difference both in
simple tests in the scala console, and couldn't find any. In both
clases obj responds just as if it was a val and not a type. This
analogy towards static classes in java breaks down because a static
class in java is one that doesn't have a containing instance, and yet:

scala class ObjectWrapper{var outerProp = prop; object obj extends
AnyRef{var prop=outerProp}}
defined class ObjectWrapper

lastly, in a desperate attempt to prove to myself that there is an
actual difference I went against your rule and changed a RequestVar
from an object extending RequestVar to a value set to an instance of
an anonymous extention and my lift app ran without any changes in
behavior???

On Aug 4, 10:42 am, David Pollak feeder.of.the.be...@gmail.com
wrote:
 In this case, if you change the type/behavior of the SessionVar and/or
 RequestVar, you could mess up code that depends on these.

 You also must *always* make RequestVar and SessionVar as object rather than
 val so that they can make the determination of their unique string ID.

 I view ProtoUser much like I view Rails' scaffolding... at some point the
 code becomes too heavy to keep subclassing and it's easier to copy the
 MegaProtoUser code into your own User class and go from there.





 On Tue, Aug 4, 2009 at 10:27 AM, E. Biggs tacoban...@gmail.com wrote:

  I have extended Mega*ProtoUser to achieve cookie-based perpetual
  login..  and it was fairly easy to do except I ended up having to do
  something hackish simply because there are two private object members
  in the class that are core to the functionality I've extended.

  Namely:

  private object curUserId extends SessionVar[Box[String]](Empty)

  private object curUser extends RequestVar[Box[ModelType]]
  (currentUserId.flatMap(id = getSingleton.find(id)))

  I have no idea if this would be an acceptable change, but at least for
  one user of lift it would make much more sense that in the spirit of
  *ProtoUser's clear intent for extensibility that these members simply
  become:

  protected val curUserId = new SessionVar[Box[String]](Empty){}

  protected val curUser = new RequestVar[Box[ModelType]]
  (currentUserId.flatMap(id = getSingleton.find(id))){}

  Unless I'm not properly understanding what object members actually
  are? I'm interpreting them as being final vals assigned to instances
  of anonymous classes (rough tests in the scala console seem to verify
  this)

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Mega*ProtoUser extensibility - a suggestion.

2009-08-04 Thread E. Biggs

I have extended Mega*ProtoUser to achieve cookie-based perpetual
login..  and it was fairly easy to do except I ended up having to do
something hackish simply because there are two private object members
in the class that are core to the functionality I've extended.

Namely:

private object curUserId extends SessionVar[Box[String]](Empty)

private object curUser extends RequestVar[Box[ModelType]]
(currentUserId.flatMap(id = getSingleton.find(id)))

I have no idea if this would be an acceptable change, but at least for
one user of lift it would make much more sense that in the spirit of
*ProtoUser's clear intent for extensibility that these members simply
become:

protected val curUserId = new SessionVar[Box[String]](Empty){}

protected val curUser = new RequestVar[Box[ModelType]]
(currentUserId.flatMap(id = getSingleton.find(id))){}

Unless I'm not properly understanding what object members actually
are? I'm interpreting them as being final vals assigned to instances
of anonymous classes (rough tests in the scala console seem to verify
this)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: Mega*ProtoUser extensibility - a suggestion.

2009-08-04 Thread E. Biggs

Actually, you're right.. I suppose I got too focused on how I wanted
to do it and didn't think of how it could be done more pleasingly

this seems to work great:

override def currentUserId: Box[String] = {
super.currentUserId match {
  case Full(_) = super.currentUserId
  case _ = tryLookingforIdFromPriorSession()
  }
  }

//wire up onLogIn to write cookie
//wire up onLogOut to delete cookie

no longer hackish

On Aug 4, 1:03 pm, Naftoli Gugenheim naftoli...@gmail.com wrote:
 Why not use logUserIdIn, logUserIn, logoutCurrentUser/logUserOut(), and 
 currentUserId, and currentUser?

 -

 E. Biggstacoban...@gmail.com wrote:

 I have extended Mega*ProtoUser to achieve cookie-based perpetual
 login..  and it was fairly easy to do except I ended up having to do
 something hackish simply because there are two private object members
 in the class that are core to the functionality I've extended.

 Namely:

 private object curUserId extends SessionVar[Box[String]](Empty)

 private object curUser extends RequestVar[Box[ModelType]]
 (currentUserId.flatMap(id = getSingleton.find(id)))

 I have no idea if this would be an acceptable change, but at least for
 one user of lift it would make much more sense that in the spirit of
 *ProtoUser's clear intent for extensibility that these members simply
 become:

 protected val curUserId = new SessionVar[Box[String]](Empty){}

 protected val curUser = new RequestVar[Box[ModelType]]
 (currentUserId.flatMap(id = getSingleton.find(id))){}

 Unless I'm not properly understanding what object members actually
 are? I'm interpreting them as being final vals assigned to instances
 of anonymous classes (rough tests in the scala console seem to verify
 this)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Interrupting sleeping actors on ctrl-c

2009-08-01 Thread E. Biggs

attn beautiful, generous lift gurus,

I've spawned off a scheduling actor that spend most of its time
asleep; it just wakes up to tell another actor when to do things i.e:
actor{ loop{ sleep( an hour ); mainActor ! do something }}. Works
like a champ except for one thing: jetty can't get clobbered with the
good ol trusty ctrl-c anymore :( It reports a message about not
interrupting my actor's sleep: java.lang.InterruptedException: sleep
interrupted...  GAH! enough beauty rest already! Time to die!

Now I got a couple things to try, and things to google - but I could
surely spare myself some time by pinging you guys since one or all of
you are likely to instantly know what to do ...


Oh as a side topic for any who wish to share. Anybody have advice/
wisdom on a development web container or time saving tips?. Obviously
the jetty/javarebel/scala:cc is ten shades of awesome..  but this is
more with regards to changes that fall out of that scope...  I
recently read an article written by a guy that was hot-deploying is
lift apps in glassfish 3 (http://weblogs.java.net/blog/vivekp/archive/
2008/05/scala_lift_web.html). I was thinking it might be worth looking
into hot deploy - but then realized jetty starts and stops so fast
that it might as well be a hot deploy already. In fact, the bulk of my
jetty:run time is spent letting maven do its thing. So is anybody else
as impatient and me and have any tips to share? I already do the mvn -
o to shave off a few seconds but is there any easy trick to shave off
more? Perhaps bypassing maven entirely? Or is there any other
container / deployment mechanism you guys like?

Thanks guys,

e

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: Interrupting sleeping actors on ctrl-c

2009-08-01 Thread E. Biggs

Ah, reimplemented with ActorPing and love it, thanks...  Just out of
curiosity though, what are the reasons for strongly recommending not
having sleep in actors? I mean besides that you can obviously get
yourself into trouble - even create a deadlock..  but in my case my
sleeping actor never received any messages itself so it seems safe?
(besides the ctrl-c problem) ..  but with this ActorPing the issue is
moot, but just curious..

On Aug 1, 5:47 am, marius d. marius.dan...@gmail.com wrote:
 I'd strongly recommend not to use sleep in the actors. Please see
 Lift's ActorPing that does exactly what you need.

 You have:

 def schedule(to: Actor, msg: Any, delay: TimeSpan) // send a message
 to the given actor after a delay

 or

 def scheduleAtFixedRate(to: Actor, msg: Any, initialDelay: TimeSpan,
 delay: TimeSpan) // same as above except it repeats the process

 Br's,
 Marius

 On Aug 1, 3:40 pm, E. Biggs tacoban...@gmail.com wrote:



  attn beautiful, generous lift gurus,

  I've spawned off a scheduling actor that spend most of its time
  asleep; it just wakes up to tell another actor when to do things i.e:
  actor{ loop{ sleep( an hour ); mainActor ! do something }}. Works
  like a champ except for one thing: jetty can't get clobbered with the
  good ol trusty ctrl-c anymore :( It reports a message about not
  interrupting my actor's sleep: java.lang.InterruptedException: sleep
  interrupted...  GAH! enough beauty rest already! Time to die!

  Now I got a couple things to try, and things to google - but I could
  surely spare myself some time by pinging you guys since one or all of
  you are likely to instantly know what to do ...

  
  Oh as a side topic for any who wish to share. Anybody have advice/
  wisdom on a development web container or time saving tips?. Obviously
  the jetty/javarebel/scala:cc is ten shades of awesome..  but this is
  more with regards to changes that fall out of that scope...  I
  recently read an article written by a guy that was hot-deploying is
  lift apps in glassfish 3 (http://weblogs.java.net/blog/vivekp/archive/
  2008/05/scala_lift_web.html). I was thinking it might be worth looking
  into hot deploy - but then realized jetty starts and stops so fast
  that it might as well be a hot deploy already. In fact, the bulk of my
  jetty:run time is spent letting maven do its thing. So is anybody else
  as impatient and me and have any tips to share? I already do the mvn -
  o to shave off a few seconds but is there any easy trick to shave off
  more? Perhaps bypassing maven entirely? Or is there any other
  container / deployment mechanism you guys like?

  Thanks guys,

  e

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: Is something up with applying By to a MappedBoolean?

2009-06-15 Thread E. Biggs

Any Ideas? I've tried distilling this down to just a most basic
example:


object BoolTest extends BoolTest with KeyedMetaMapper[Long, BoolTest]
{
  override def dbTableName = BoolTest
  override def fieldOrder = id :: testField :: Nil
}

class BoolTest extends KeyedMapper[Long, BoolTest] {
  def getSingleton = BoolTest
  def primaryKeyField = id

  object id extends MappedLongIndex(this)

  object testField extends MappedBoolean(this)
}


And I still get:
2009-06-15 10:06:44.163 GMT Thread[Thread-14,5,main] (XID = 489),
(SESSIONID = 0), (DATABASE = lift_example), (DRDAID = null), Failed
Statement is: SELECT  DISTINCT BoolTest.id, BoolTest.testfield FROM
BoolTest   WHERE testfield = ?

When I do:

val abc = BoolTest.findAll(By(BoolTest.testField, true))

on start up.


Any ideas? Or should I report a bug or what?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: Is something up with applying By to a MappedBoolean?

2009-06-04 Thread E. Biggs
)
at com.yo.model.Property$.findMapDb(Property.scala:5)
at net.liftweb.mapper.MetaMapper$class.findAll(MetaMapper.scala:259)
at com.yo.model.Property$.findAll(Property.scala:5)
at com.yo.controller.Geocoder$.beginGoogleGeocoding(Geocoder.scala:
33)
at com.yo.controller.Geocoder$.beginGeocoding(Geocoder.scala:29)
at com.yo.controller.Geocoder$$anonfun$act$1$$anonfun$apply$1.apply
(Geocoder.scala:23)
at com.yo.controller.Geocoder$$anonfun$act$1$$anonfun$apply$1.apply
(Geocoder.scala:21)
at scala.actors.Reaction.run(Reaction.scala:78)
at scala.actors.Scheduler$$anon$2.run(Scheduler.scala:77)
at scala.actors.FJTaskRunner.scanWhileIdling(Unknown Source)
at scala.actors.FJTaskRunner.run(Unknown Source)
Cleanup action completed


On Jun 3, 12:46 am, Timothy Perrett timo...@getintheloop.eu wrote:
 Is there an exception? If so could you post the entire trace?

 Cheers, Tim

 On Jun 3, 3:24 am, E. Biggs tacoban...@gmail.com wrote:

  When I try to apply By to a MappedBoolean like so:

  Table.findAll(By(Table.booleanField, false)); derby is unhappy and
  bombs out on some sql with this kind of where clause:

  WHERE Table.booleanfield = ?

  Is this a bug or am I doing something wrong? I'm using 1.1-SNAPSHOT

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Is something up with applying By to a MappedBoolean?

2009-06-02 Thread E. Biggs

When I try to apply By to a MappedBoolean like so:

Table.findAll(By(Table.booleanField, false)); derby is unhappy and
bombs out on some sql with this kind of where clause:

WHERE Table.booleanfield = ?

Is this a bug or am I doing something wrong? I'm using 1.1-SNAPSHOT

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: Firefox issue: anybody seen this?

2009-01-19 Thread E. Biggs

Hey thanks for the suggestions..  although I figured out what my
problem is and it's a bit frustrating...

What happened was that lift, as you probably know is all about xhtml..
which is incompatible with google maps (supposedly because it doesn't
support document.write or something supposedly?) So I was switching my
MIME type to text/html...  And everything was fine.. except that lift
doesn't play super nice with html which doesn't like having self
closing tags...

So what was happening was Firefox, being an html stickler, will choke
on self closing script tags while safari will gracefully accept them.

Of course Firefox is happy if I just switch my MIME type back to
application/xhtml+xml but then google maps is unhappy.

So, as far as I can tell I'm not going to be able to support firefox
unless either google accepts xhtml or lift is happier about gratuitous
end tags...  Anybody know of a simple workaround for the latter?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: Firefox issue: anybody seen this?

2009-01-19 Thread E. Biggs

David,

Awesome this is probably just what I'm looking for, I'll give it a
shot.

Charles,

I did make some assumptions with my diagnoses. The behavior I see is
that when I change the MIME type to application/xhtml+xml I get a js
error complaining that GMap2 is undefined. Combined with information
on the net such as a href=http://groups.google.gm/group/Google-Maps-
API/browse_thread/thread/7dfcbb080d929b81/6cf8fd021ca8e98bthis/a

I made the assumption that that's my problem.

I'd be interested to know if/how you get GMap2 to be defined under
that MIME type though?

On Jan 19, 10:04 am, Charles F. Munat c...@munat.com wrote:
 I use Google maps (but very basically) on several sites with lift using
 XHTML 1.1 with no problem. What is it hassling you with?

 Chas.

 E. Biggs wrote:
  Hey thanks for the suggestions..  although I figured out what my
  problem is and it's a bit frustrating...

  What happened was that lift, as you probably know is all about xhtml..
  which is incompatible with google maps (supposedly because it doesn't
  support document.write or something supposedly?) So I was switching my
  MIME type to text/html...  And everything was fine.. except that lift
  doesn't play super nice with html which doesn't like having self
  closing tags...

  So what was happening was Firefox, being an html stickler, will choke
  on self closing script tags while safari will gracefully accept them.

  Of course Firefox is happy if I just switch my MIME type back to
  application/xhtml+xml but then google maps is unhappy.

  So, as far as I can tell I'm not going to be able to support firefox
  unless either google accepts xhtml or lift is happier about gratuitous
  end tags...  Anybody know of a simple workaround for the latter?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---