[Lift] Re: Eclipse + Lift question: WebAppContext is not a member of _root_.org.mortbay.jetty.webapp

2009-03-06 Thread Alexander Azarov
On Mar 6, 1:07 am, David Bernard david.bernard...@gmail.com wrote: try (not tested) * In your pom.xml, force the version of jetty to be an exact version like 6.1.14 instead of the current version of jetty something like [6.1,) (== latest version available upper 6.1) Setting version to

[Lift] Re: Record and JSON

2009-03-06 Thread Timothy Perrett
POC == Proof of concept On Mar 5, 11:33 pm, Charles F. Munat c...@munat.com wrote: POC? --~--~-~--~~~---~--~~ 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

[Lift] Re: Proposed addition to LRU

2009-03-06 Thread Timothy Perrett
Scratch that, had to change to: def keys: List[KeyType] = map.keySet().toList.map(_.asInstanceOf [KeyType]) because of a type error. On Mar 6, 9:50 am, Timothy Perrett timo...@getintheloop.eu wrote: Ok - I changed it to: def keys: List[KeyType] = map.keySet().asInstanceOf[Set

[Lift] Proposed localization change to S

2009-03-06 Thread Tim Perrett
Guys, I have a situation where I want to localize a bunch of dynamic texts, however the current behavior of S.? is to return the input text if its found in a resource bundle. Whilst I see the rational for this, I have another situation where I want to pass a key, and if it doesn't find it,

[Lift] Re: Proposed localization change to S

2009-03-06 Thread Derek Chen-Becker
I think this is a reasonable addition, but I would use def ?(key : String, defaultKey : String) = ... That way changing the default text just doesn't require changes to code. Derek On Fri, Mar 6, 2009 at 6:29 AM, Tim Perrett timo...@getintheloop.eu wrote: Guys, I have a situation where I

[Lift] Re: reporting snippet instantiation errors

2009-03-06 Thread Derek Chen-Becker
Let me create a branch for this and test it out. Also, could you tell me what the error was with your snippet so I can compare current behavior with what the patch provides? Derek On Thu, Mar 5, 2009 at 10:59 PM, Lee Mighdoll leemighd...@gmail.com wrote: When I had a bug which threw an

[Lift] Re: reporting snippet instantiation errors

2009-03-06 Thread Derek Chen-Becker
Sorry, to clarify, it was the snippet class constructor that threw, correct? On Fri, Mar 6, 2009 at 8:20 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: Let me create a branch for this and test it out. Also, could you tell me what the error was with your snippet so I can compare current

[Lift] Re: reporting snippet instantiation errors

2009-03-06 Thread Lee Mighdoll
Sure, thanks for taking a look. My snippet class had something like this: import scala.io.Source class MySnippet { val file = Source.fromFile(mistypedFileName) } (The patched version generates two error log messages in this case. I couldn't figure out a small patch to make it just one

[Lift] Re: reporting snippet instantiation errors

2009-03-06 Thread Derek Chen-Becker
I agree that it's an iffy pattern, but I also think that it's important to make error messages as clear as possible. I'm testing the patch right now (made a minor mod) and I'll push the branch to github in a little bit for review. Derek On Fri, Mar 6, 2009 at 9:14 AM, Timothy Perrett

[Lift] Re: Proposed localization change to S

2009-03-06 Thread marius d.
+1 for overloading '? ' On Mar 6, 4:52 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: I think this is a reasonable addition, but I would use def ?(key : String, defaultKey : String) = ... That way changing the default text just doesn't require changes to code. Derek On Fri, Mar 6,

[Lift] Re: Proposed localization change to S

2009-03-06 Thread Derek Chen-Becker
It would be a little cleaner if there was a helper overload: def loc (key : String, default : String) = loc(key, Text(default)) Derek On Fri, Mar 6, 2009 at 12:16 PM, Timothy Perrett timo...@getintheloop.euwrote: I've just been looking at some of the other method overloads in S and it

[Lift] Re: MappedTextarea problem

2009-03-06 Thread TylerWeir
blueprintCSS which is more than likely the CSS boss for your app defines textarea style in screen.css. I tend to add a dedicated stylesheet for just such an overriding- required situation. Tyler On Mar 3, 5:05 pm, Derek Chen-Becker dchenbec...@gmail.com wrote: I agree with Joachim, this is

[Lift] Re: Record and JSON

2009-03-06 Thread Jorge Ortiz
Hey Folks, I wrote a Json AST and parser/serializer for unrelated reasons yesterday. This could be the basis of a Record -- Json tool. --j On Wed, Mar 4, 2009 at 9:11 AM, David Pollak feeder.of.the.be...@gmail.comwrote: On Wed, Mar 4, 2009 at 9:08 AM, Marius marius.dan...@gmail.com wrote:

[Lift] Re: reporting snippet instantiation errors

2009-03-06 Thread Lee Mighdoll
Thanks for both the suggestion and the patch review. For future reference on submitting patches -- is it best to email a patch or is there some more savvy git trick? Lee On Fri, Mar 6, 2009 at 8:47 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: I agree that it's an iffy pattern, but I also

[Lift] Re: reporting snippet instantiation errors

2009-03-06 Thread Lee Mighdoll
Thanks for both the suggestion and the patch review. For future reference on submitting patches -- is it best to email a patch or is there some more savvy git trick? Lee On Fri, Mar 6, 2009 at 8:47 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: I agree that it's an iffy pattern, but I also

[Lift] Re: reporting snippet instantiation errors

2009-03-06 Thread Derek Chen-Becker
Actually, I had forgotten that we generally don't accept patches from the mailing list in order to keep the IP of Lift clean. All of the committers have to sign release forms to make sure that we don't taint the codebase. In your case this was relatively minor and I've done the equivalent work on

[Lift] Re: Eclipse + Lift question: WebAppContext is not a member of _root_.org.mortbay.jetty.webapp

2009-03-06 Thread Amy de Buitléir
How are you doing eclipse dependency management?  Q4e, m2e or maven- eclipse-plugin? I'm not sure if this answers your question, but when I look at the list of installed software in Eclipse, I don't see anything that matches those names exactly. I see Maven Integration for Eclipse, version

[Lift] Re: Proposed localization change to S

2009-03-06 Thread Timothy Perrett
Isn't the danger here that Text() will explode if for some reason default was null (e.g Reading from a DB)? It's not a massive issue, as people should be diligent about supplying defaults but it's just a though. Cheers, Tim Sent from my iPhone On 6 Mar 2009, at 18:32, Derek Chen-Becker

[Lift] Re: reporting snippet instantiation errors

2009-03-06 Thread Derek Chen-Becker
OK, I reworked it a bit so that you not only get the exception, but you get a stack trace. I can't think of any sane reason that you would want a snippet constructor exception so I figured the trace would be useful for troubleshooting. It's checked in on the wip-dcb-mighdoll-snippet-createexcpt

[Lift] Re: Proposed localization change to S

2009-03-06 Thread David Pollak
On Fri, Mar 6, 2009 at 3:52 PM, Timothy Perrett timo...@getintheloop.euwrote: Isn't the danger here that Text() will explode if for some reason default was null (e.g Reading from a DB)? It's not a massive issue, as people should be diligent about supplying defaults but it's just a though.

[Lift] Re: Proposed localization change to S

2009-03-06 Thread Derek Chen-Becker
I think that adding an overload for loc(String,String) that maps to loc(String,NodeSeq) with null testing provides simplicity for the user (not having to explicitly wrap everything in Text() unless you have specific need for it). At the risk of making this a little more complex but adding some