[Lift] Re: Changing scope of RulesSeq[T] toList

2009-02-04 Thread David Pollak
On Wed, Feb 4, 2009 at 6:27 AM, Tim Perrett he...@timperrett.com wrote: Guy, Im just trying to write a small and very situation specific extension to lift rules. Whilst it is specific, its very reusable for me and one of the things id like to do is extend RulesSeq[T]. This way, I my lift

[Lift] Re: Changing scope of RulesSeq[T] toList

2009-02-04 Thread Tim Perrett
Yes... this mutates the state of the underlying object, thus needs to be done privately and correctly. private[http] def toList = rules How does this mutate state? Its just returning the list isn't it (as its def not val/var)? It appears to me that the prepend and append methods mutate the

[Lift] Re: Changing scope of RulesSeq[T] toList

2009-02-04 Thread David Pollak
Sorry... for some reason I was thinking that the underlying implementation used a LiftBuffer, not a List for the backing store. I've unprivitized the method. On Wed, Feb 4, 2009 at 7:37 AM, Tim Perrett he...@timperrett.com wrote: Yes... this mutates the state of the underlying object, thus

[Lift] RewriteResponse to url of existing image file

2009-02-04 Thread Joachim A.
Hi, I have a RewritePf to show the right image when the user's thumb is requested. If the thumb exists a rewrite to an url is done where a dispatchPf returns a binary stream. If the thumb does not exist then the rewrite just returns the path to a default image on disk. I can't make the

[Lift] *Breaking change* SessionVar and RequestVar

2009-02-04 Thread David Pollak
Folks, The cleanup function for SessionVar has changed from () = Unit to LiftSession = Unit. The cleanup function for RequestVar has changed from () = Unit to Box[LiftSession] = Unit. Also, Box now has a ~ method. This allows you to add information to a Failure: myBox ?~ Didn't supply

[Lift] Re: RewriteResponse to url of existing image file

2009-02-04 Thread David Pollak
On Wed, Feb 4, 2009 at 9:40 AM, Joachim A. wallaby.po...@googlemail.comwrote: Hi, I have a RewritePf to show the right image when the user's thumb is requested. If the thumb exists a rewrite to an url is done where a dispatchPf returns a binary stream. If the thumb does not exist then

[Lift] Fwd: [scala-user] ANN: 1st ever Chicago-Area Scala Enthusiasts Meeting, 2/19 at ThoughtWorks

2009-02-04 Thread David Pollak
Gettin' the word out! -- Forwarded message -- From: Dean Wampler deanwamp...@gmail.com Date: Wed, Feb 4, 2009 at 11:22 AM Subject: [scala-user] ANN: 1st ever Chicago-Area Scala Enthusiasts Meeting, 2/19 at ThoughtWorks To: CASE chicagosc...@googlegroups.com, Scala User List

[Lift] Re: Fwd: [scala-user] ANN: 1st ever Chicago-Area Scala Enthusiasts Meeting, 2/19 at ThoughtWorks

2009-02-04 Thread TylerWeir
I need to get something like this going in Toronto. On Feb 4, 2:30 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Gettin' the word out! -- Forwarded message -- From: Dean Wampler deanwamp...@gmail.com Date: Wed, Feb 4, 2009 at 11:22 AM Subject: [scala-user] ANN: 1st

[Lift] Re: Need access to session variables when about to shut down a session.

2009-02-04 Thread Alli
Hey David, Two questions this time: I've been playing with your commit earlier today and cleaning up SessionVar's. I got: object sessDirHash extends SessionVar[String]() { def cleanUpFunc(sess: LiftSession) = { println(Got hash: + this.is) } In my test snippet I got: sessDirHash(this is

[Lift] Work on the ESME REST APIs (and some stuff that will be rolled into Lift)

2009-02-04 Thread David Pollak
Folks, I'm been working on the updates to the ESME REST APIs. I've reduced the call cycle to something that looks like: 1. A request is dispatched based on the URL 2. The target of the dispatch returns a Box[T] where T is the type of the thing that will be calculated if it can be

[Lift] Re: Need access to session variables when about to shut down a session.

2009-02-04 Thread David Pollak
That's because cleanUpFunc is gone. You must do: object sessDirHash extends SessionVar[String]() { registerCleanupFunc(session = println(Got hash: + this.is)) } On Wed, Feb 4, 2009 at 12:43 PM, Alli allilis...@gmail.com wrote: Hey David, Two questions this time: I've been playing with

[Lift] Re: Work on the ESME REST APIs (and some stuff that will be rolled into Lift)

2009-02-04 Thread TylerWeir
Really excellent stuff Dave. I look forward to incorporating this stuff as soon as it appears. Thanks. On Feb 4, 3:45 pm, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, I'm been working on the updates to the ESME REST APIs. I've reduced the call cycle to something that looks

[Lift] Re: Need access to session variables when about to shut down a session.

2009-02-04 Thread Alli
Sorry, for some reason the whole stuff i copy/pasted didn't get in: object sessDirHash extends SessionVar[String]() { def cleanUpFunc(sess: LiftSession) = { println(Got hash: + this.is) registerCleanUpFunc(cleanUpFunc _) } Anyway I changed it to this: object sessDirHash extends

[Lift] Re: Need access to session variables when about to shut down a session.

2009-02-04 Thread Kris Nuttycombe
Heh, this one just bit me too. I can't say I didn't warn myself, though: // This is way too dependent upon an implementation detail of the superclass. override def cleanupFunc : Box[() = Unit] = { ... } Kris On Wed, Feb 4, 2009 at 1:47 PM, David Pollak

[Lift] Re: Need access to session variables when about to shut down a session.

2009-02-04 Thread David Pollak
I've just realized that I'm a complete idiot. I need to totally re-do the clean-up mechanism. Please give me an hour. On Wed, Feb 4, 2009 at 3:06 PM, Kris Nuttycombe kris.nuttyco...@gmail.comwrote: Heh, this one just bit me too. I can't say I didn't warn myself, though: // This is way too

[Lift] Re: Need access to session variables when about to shut down a session.

2009-02-04 Thread Alli
No worries, the session vars seem to be reset to their default values before the callback gets called. I followed the code myself in Vars and LiftSession and couldn't find anything wrong. Will look at your change set tomorrow to learn better how this works. If i spot possible bugs I would like

[Lift] Re: migration tools?

2009-02-04 Thread Meredith Gregory
Lifted, It turns out that Hibernate already supplies this functionalityhttp://www.hibernate.org/hib_docs/tools/reference/en/html/reverseengineering.html . Best wishes, --greg On Mon, Feb 2, 2009 at 1:45 PM, Meredith Gregory lgreg.mered...@gmail.comwrote: Tim, Thanks for your note. i was

[Lift] Re: migration tools?

2009-02-04 Thread Derek Chen-Becker
I think the Eclipse plugin for JPA also supports reverse-engineering a set of entity classes from a given schema. Once you have those you can use them directly in Lift. If you're looking for using Mapper or Record, though, that's still work in progress. Derek On 2/4/09, Meredith Gregory