[Lift] Re: Can or Box or something else

2008-12-26 Thread Caoyuan

and Pack ?

On Fri, Dec 26, 2008 at 8:35 AM, Marc Boschma marc+lift...@boschma.cx wrote:

 I know David has resigned to keeping 'Can', but wouldn't 'Jar' be an
 alternative? That way Empty and Full still make sense...

 Initially I thought 'Tin' sounded better but I recognise that term
 wouldn't be as universal.

 Marc

 On 26/12/2008, at 4:14 AM, Michael Campbell wrote:


 David Pollak wrote:
 Folks,

 Over the year that Lift has had Can[T] as a replacement for Scala's
 Option[T], the name Can has required a lot of explaining.


 I've never liked Can as a name; always thinking that the opposite
 of one
 should be a Can't.   I'm sure it's my own issue to solve, but it's
 cognitively dissonant to me.

 Any other container name works better for me, although of the ones
 you listed,
 I like Box.


 --
 Twitter:  http://twitter.com/campbellmichael

 


 


--~--~-~--~~~---~--~~
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] MetaMapper.toForm ignores formFields

2008-12-26 Thread Joachim A.

Hi,
MetaMapper's toForm is currently defined to use mappedFieldList instead of the 
fields which should be displayed (formFields).

Is it possible to make it use formFields? Otherwise it's hard to set the field 
order for toForm, I think.

Joachim

--~--~-~--~~~---~--~~
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: versions out of whack?

2008-12-26 Thread Charles F. Munat

OK, so it's still 2.7.2, I just need to re-grab everything. Will do.

Thanks,
Chas.

David Pollak wrote:
 Charles,
 
 I did an update to the XML rendering stuff.  It looks like half your 
 Lift jars are old and half are new.  I'd suggest blowing away your Maven 
 repository and doing a clean build.
 
 Thanks,
 
 David
 
 On Fri, Dec 26, 2008 at 3:15 PM, Charles F. Munat c...@munat.com 
 mailto:c...@munat.com wrote:
 
 
 Here's a new one I haven't seen before. Are my versions out of whack?
 Should I be moving up to Scala 2.7.3? What's wrong here?
 
 Any ideas?
 
 Chas.
 
 HTTP ERROR: 500
 
 
 net.liftweb.util.AltXML$.toXML(Lscala/xml/Node;Lscala/xml/NamespaceBinding;Lscala/StringBuilder;ZZ)V
 
 RequestURI=/
 Caused by:
 
 java.lang.NoSuchMethodError:
 
 net.liftweb.util.AltXML$.toXML(Lscala/xml/Node;Lscala/xml/NamespaceBinding;Lscala/StringBuilder;ZZ)V
at
 net.liftweb.http.NodeResponse$class.toResponse(XmlResponse.scala:40)
at
 net.liftweb.http.XhtmlResponse.toResponse(XmlResponse.scala:49)
at
 net.liftweb.http.XhtmlResponse.toResponse(XmlResponse.scala:49)
at net.liftweb.http.LiftServlet.doService(LiftServlet.scala:176)
at
 net.liftweb.http.LiftServlet$$anonfun$doIt$1$1.apply(LiftServlet.scala:97)
at
 net.liftweb.http.LiftServlet$$anonfun$doIt$1$1.apply(LiftServlet.scala:97)
at
 net.liftweb.util.TimeHelpers$class.calcTime(TimeHelpers.scala:242)
at net.liftweb.util.Helpers$.calcTime(Helpers.scala:29)
at
 net.liftweb.util.TimeHelpers$class.logTime(TimeHelpers.scala:251)
at net.liftweb.util.Helpers$.logTime(Helpers.scala:29)
at net.liftweb.http.LiftServlet.doIt$1(LiftServlet.scala:96)
at net.liftweb.http.LiftServlet.service(LiftServlet.scala:105)
at
 
 net.liftweb.http.LiftFilterTrait$$anonfun$doFilter$1$$anonfun$apply$18.apply(LiftServlet.scala:483)
at
 
 net.liftweb.http.LiftFilterTrait$$anonfun$doFilter$1$$anonfun$apply$18.apply(LiftServlet.scala:483)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:33)
at net.liftweb.http.URLRewriter$.doWith(Req.scala:370)
at
 
 net.liftweb.http.LiftFilterTrait$$anonfun$doFilter$1.apply(LiftServlet.scala:482)
at
 
 net.liftweb.http.LiftFilterTrait$$anonfun$doFilter$1.apply(LiftServlet.scala:476)
at
 
 net.liftweb.http.RequestVarHandler$$anonfun$apply$3$$anonfun$apply$4$$anonfun$apply$5.apply(Vars.scala:150)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:33)
at
 
 net.liftweb.http.RequestVarHandler$$anonfun$apply$3$$anonfun$apply$4.apply(Vars.scala:149)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:33)
at
 net.liftweb.http.RequestVarHandler$$anonfun$apply$3.apply(Vars.scala:148)
at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:33)
at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:147)
at
 net.liftweb.http.LiftFilterTrait$class.doFilter(LiftServlet.scala:475)
at net.liftweb.http.LiftFilter.doFilter(LiftServlet.scala:496)
at
 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361)
at
 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
at
 
 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at
 
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
at
 
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:864)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:533)
at
 org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:207)
at
 org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
at
 
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at
 
 org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)
 
 
 
 
 
 -- 
 Lift, the simply functional web framework http://liftweb.net
 Collaborative Task Management 

[Lift] Partial functions

2008-12-26 Thread Charles F. Munat

As a holiday gift to myself I am reading Programming in Scala from cover 
to cover. I've gotten as far as the pattern matching stuff and there's a 
discussion of partial functions. PiS says: In general, you should try 
to work with complete functions whenever possible...

But I notice that the Lift code is filled with partial functions. 
They're all over the place.

What is the benefit of using partial functions that outweighs the 
detriment of possible runtime errors? I'm trying to understand why 
partial functions might be useful.

Thanks!
Chas.

--~--~-~--~~~---~--~~
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: versions out of whack?

2008-12-26 Thread Tim Perrett

Chas,

Do you have the scala-tools.org snapshot repo defined in your pom.xml?

If not, you'll need to add it. then maven will grab it automatically  
for you. The other alternative is to build locally from src. If your  
not working on the lift codebase, IMO, use the maven snapshots as it's  
the most straight forward route.

Does that make sense?

Cheers, Tim

Sent from my iPhone

On 27 Dec 2008, at 00:25, Charles F. Munat c...@munat.com wrote:


 What does it mean when I get this error:

 1) net.liftweb:lift-webkit:jar:0.10-SNAPSHOT

   Try downloading the file manually from the project website.

   Then, install it using the command:
   mvn install:install-file -DgroupId=net.liftweb
 -DartifactId=lift-webkit -Dversion=0.10-SNAPSHOT -Dpackaging=jar
 -Dfile=/path/to/file

   Alternatively, if you host your own repository you can deploy the
 file there:
   mvn deploy:deploy-file -DgroupId=net.liftweb
 -DartifactId=lift-webkit -Dversion=0.10-SNAPSHOT -Dpackaging=jar
 -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

   Path to dependency:
 1) com.xxx:yyy-app:war:0.10-SNAPSHOT
 2) net.liftweb:lift-webkit:jar:0.10-SNAPSHOT

 I got this before and got around it by using git and then building and
 installing Lift manually, but shouldn't it be possible to just run  
 Maven
 and have it work? Am I doing something wrong?

 Chas.

 David Pollak wrote:
 Charles,

 I did an update to the XML rendering stuff.  It looks like half your
 Lift jars are old and half are new.  I'd suggest blowing away your  
 Maven
 repository and doing a clean build.

 Thanks,

 David

 On Fri, Dec 26, 2008 at 3:15 PM, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:


Here's a new one I haven't seen before. Are my versions out of  
 whack?
Should I be moving up to Scala 2.7.3? What's wrong here?

Any ideas?

Chas.

HTTP ERROR: 500

net.liftweb.util.AltXML$.toXML(Lscala/xml/Node;Lscala/xml/ 
 NamespaceBinding;Lscala/StringBuilder;ZZ)V

RequestURI=/
Caused by:

java.lang.NoSuchMethodError:
net.liftweb.util.AltXML$.toXML(Lscala/xml/Node;Lscala/xml/ 
 NamespaceBinding;Lscala/StringBuilder;ZZ)V
   at
net.liftweb.http.NodeResponse$class.toResponse(XmlResponse.scala: 
 40)
   at
net.liftweb.http.XhtmlResponse.toResponse(XmlResponse.scala:49)
   at
net.liftweb.http.XhtmlResponse.toResponse(XmlResponse.scala:49)
   at  
 net.liftweb.http.LiftServlet.doService(LiftServlet.scala:176)
   at
net.liftweb.http.LiftServlet$$anonfun$doIt 
 $1$1.apply(LiftServlet.scala:97)
   at
net.liftweb.http.LiftServlet$$anonfun$doIt 
 $1$1.apply(LiftServlet.scala:97)
   at
net.liftweb.util.TimeHelpers$class.calcTime(TimeHelpers.scala:242)
   at net.liftweb.util.Helpers$.calcTime(Helpers.scala:29)
   at
net.liftweb.util.TimeHelpers$class.logTime(TimeHelpers.scala:251)
   at net.liftweb.util.Helpers$.logTime(Helpers.scala:29)
   at net.liftweb.http.LiftServlet.doIt$1(LiftServlet.scala: 
 96)
   at net.liftweb.http.LiftServlet.service(LiftServlet.scala: 
 105)
   at
net.liftweb.http.LiftFilterTrait$$anonfun$doFilter$1$$anonfun 
 $apply$18.apply(LiftServlet.scala:483)
   at
net.liftweb.http.LiftFilterTrait$$anonfun$doFilter$1$$anonfun 
 $apply$18.apply(LiftServlet.scala:483)
   at  
 net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:33)
   at net.liftweb.http.URLRewriter$.doWith(Req.scala:370)
   at
net.liftweb.http.LiftFilterTrait$$anonfun$doFilter 
 $1.apply(LiftServlet.scala:482)
   at
net.liftweb.http.LiftFilterTrait$$anonfun$doFilter 
 $1.apply(LiftServlet.scala:476)
   at
net.liftweb.http.RequestVarHandler$$anonfun$apply$3$$anonfun 
 $apply$4$$anonfun$apply$5.apply(Vars.scala:150)
   at  
 net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:33)
   at
net.liftweb.http.RequestVarHandler$$anonfun$apply$3$$anonfun 
 $apply$4.apply(Vars.scala:149)
   at  
 net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:33)
   at
net.liftweb.http.RequestVarHandler$$anonfun$apply 
 $3.apply(Vars.scala:148)
   at  
 net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:33)
   at net.liftweb.http.RequestVarHandler$.apply(Vars.scala: 
 147)
   at
net.liftweb.http.LiftFilterTrait 
 $class.doFilter(LiftServlet.scala:475)
   at net.liftweb.http.LiftFilter.doFilter(LiftServlet.scala: 
 496)
   at
org.mortbay.jetty.servlet.ServletHandler 
 $CachedChain.doFilter(ServletHandler.java:1115)
   at
 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 
 361)
   at
 
 org. 
 mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 
 216)
   at
 
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 
 181)
   at
 
 

[Lift] Re: versions out of whack?

2008-12-26 Thread Charles F. Munat

I have this in my master pom.xml file:

   repositories
 repository
   idscala-tools.org/id
   nameScala-Tools Maven2 Repository/name
   urlhttp://scala-tools.org/repo-releases/url
 /repository
 repository
   idscala-tools.org/id
   nameScala-Tools Maven2 Repository/name
   urlhttp://scala-tools.org/repo-snapshots/url
 /repository
   /repositories

   pluginRepositories
 pluginRepository
   idscala-tools.org/id
   nameScala-Tools Maven2 Repository/name
   urlhttp://scala-tools.org/repo-releases/url
 /pluginRepository
   /pluginRepositories

Is this correct? Am I missing something?

Chas.

Tim Perrett wrote:
 Chas,
 
 Do you have the scala-tools.org snapshot repo defined in your pom.xml?
 
 If not, you'll need to add it. then maven will grab it automatically  
 for you. The other alternative is to build locally from src. If your  
 not working on the lift codebase, IMO, use the maven snapshots as it's  
 the most straight forward route.
 
 Does that make sense?
 
 Cheers, Tim
 
 Sent from my iPhone
 
 On 27 Dec 2008, at 00:25, Charles F. Munat c...@munat.com wrote:
 
 What does it mean when I get this error:

 1) net.liftweb:lift-webkit:jar:0.10-SNAPSHOT

   Try downloading the file manually from the project website.

   Then, install it using the command:
   mvn install:install-file -DgroupId=net.liftweb
 -DartifactId=lift-webkit -Dversion=0.10-SNAPSHOT -Dpackaging=jar
 -Dfile=/path/to/file

   Alternatively, if you host your own repository you can deploy the
 file there:
   mvn deploy:deploy-file -DgroupId=net.liftweb
 -DartifactId=lift-webkit -Dversion=0.10-SNAPSHOT -Dpackaging=jar
 -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

   Path to dependency:
 1) com.xxx:yyy-app:war:0.10-SNAPSHOT
 2) net.liftweb:lift-webkit:jar:0.10-SNAPSHOT

 I got this before and got around it by using git and then building and
 installing Lift manually, but shouldn't it be possible to just run  
 Maven
 and have it work? Am I doing something wrong?

 Chas.

 David Pollak wrote:
 Charles,

 I did an update to the XML rendering stuff.  It looks like half your
 Lift jars are old and half are new.  I'd suggest blowing away your  
 Maven
 repository and doing a clean build.

 Thanks,

 David

 On Fri, Dec 26, 2008 at 3:15 PM, Charles F. Munat c...@munat.com
 mailto:c...@munat.com wrote:


Here's a new one I haven't seen before. Are my versions out of  
 whack?
Should I be moving up to Scala 2.7.3? What's wrong here?

Any ideas?

Chas.

HTTP ERROR: 500

net.liftweb.util.AltXML$.toXML(Lscala/xml/Node;Lscala/xml/ 
 NamespaceBinding;Lscala/StringBuilder;ZZ)V

RequestURI=/
Caused by:

java.lang.NoSuchMethodError:
net.liftweb.util.AltXML$.toXML(Lscala/xml/Node;Lscala/xml/ 
 NamespaceBinding;Lscala/StringBuilder;ZZ)V
   at
net.liftweb.http.NodeResponse$class.toResponse(XmlResponse.scala: 
 40)
   at
net.liftweb.http.XhtmlResponse.toResponse(XmlResponse.scala:49)
   at
net.liftweb.http.XhtmlResponse.toResponse(XmlResponse.scala:49)
   at  
 net.liftweb.http.LiftServlet.doService(LiftServlet.scala:176)
   at
net.liftweb.http.LiftServlet$$anonfun$doIt 
 $1$1.apply(LiftServlet.scala:97)
   at
net.liftweb.http.LiftServlet$$anonfun$doIt 
 $1$1.apply(LiftServlet.scala:97)
   at
net.liftweb.util.TimeHelpers$class.calcTime(TimeHelpers.scala:242)
   at net.liftweb.util.Helpers$.calcTime(Helpers.scala:29)
   at
net.liftweb.util.TimeHelpers$class.logTime(TimeHelpers.scala:251)
   at net.liftweb.util.Helpers$.logTime(Helpers.scala:29)
   at net.liftweb.http.LiftServlet.doIt$1(LiftServlet.scala: 
 96)
   at net.liftweb.http.LiftServlet.service(LiftServlet.scala: 
 105)
   at
net.liftweb.http.LiftFilterTrait$$anonfun$doFilter$1$$anonfun 
 $apply$18.apply(LiftServlet.scala:483)
   at
net.liftweb.http.LiftFilterTrait$$anonfun$doFilter$1$$anonfun 
 $apply$18.apply(LiftServlet.scala:483)
   at  
 net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:33)
   at net.liftweb.http.URLRewriter$.doWith(Req.scala:370)
   at
net.liftweb.http.LiftFilterTrait$$anonfun$doFilter 
 $1.apply(LiftServlet.scala:482)
   at
net.liftweb.http.LiftFilterTrait$$anonfun$doFilter 
 $1.apply(LiftServlet.scala:476)
   at
net.liftweb.http.RequestVarHandler$$anonfun$apply$3$$anonfun 
 $apply$4$$anonfun$apply$5.apply(Vars.scala:150)
   at  
 net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:33)
   at
net.liftweb.http.RequestVarHandler$$anonfun$apply$3$$anonfun 
 $apply$4.apply(Vars.scala:149)
   at  
 net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:33)
   at
net.liftweb.http.RequestVarHandler$$anonfun$apply 
 $3.apply(Vars.scala:148)
   at