[Lift] Re: how to add object into session scope in lift

2009-05-03 Thread Andrew Scherpbier
David Pollak wrote: On Thu, Apr 30, 2009 at 10:48 PM, Andrew Scherpbier and...@scherpbier.org mailto:and...@scherpbier.org wrote: The Getting Started document got me hooked on Lift. :-) I guess I'll report my struggles from there. I don't know if what I did is

[Lift] Re: how to add object into session scope in lift

2009-05-03 Thread David Pollak
On Sat, May 2, 2009 at 12:35 PM, Andrew Scherpbier and...@scherpbier.orgwrote: David Pollak wrote: On Thu, Apr 30, 2009 at 10:48 PM, Andrew Scherpbier and...@scherpbier.org mailto:and...@scherpbier.org wrote: The Getting Started document got me hooked on Lift. :-) I

[Lift] Re: how to add object into session scope in lift

2009-05-02 Thread David Pollak
On Thu, Apr 30, 2009 at 10:48 PM, Andrew Scherpbier and...@scherpbier.orgwrote: The Getting Started document got me hooked on Lift. :-) I guess I'll report my struggles from there. I don't know if what I did is typical. After actually running the two examples from the Getting Started

[Lift] Re: how to add object into session scope in lift

2009-05-01 Thread Andrew Scherpbier
The Getting Started document got me hooked on Lift. :-) I guess I'll report my struggles from there. I don't know if what I did is typical. After actually running the two examples from the Getting Started docs, I looked and found some other examples, did some looking around in the mailing

Static imports considered evil? (was: Re: [Lift] Re: how to add object into session scope in lift)

2009-05-01 Thread Andrew Scherpbier
I just realized another issue I keep running into... Since I don't have the full liftweb API in my head, yet, I am having trouble with some of the examples because of the use of ._ for imports (and this is why I never let my developers use static or wildcard imports in our own java code) For

Re: Static imports considered evil? (was: Re: [Lift] Re: how to add object into session scope in lift)

2009-05-01 Thread Derek Chen-Becker
I've been trying to at least provide an object name for any methods like this in the example code as I work on feedback, but if you find any in the book that aren't clear please give me a listing # and I'll work on them. Thanks! Derek On Fri, May 1, 2009 at 7:27 AM, Andrew Scherpbier

Re: Static imports considered evil? (was: Re: [Lift] Re: how to add object into session scope in lift)

2009-05-01 Thread Derek Chen-Becker
And yes, I consider wildcards to be not great style. They were done here for expediency, but I'll see about going back and reworking the code at some point. Derek On Fri, May 1, 2009 at 8:57 AM, Derek Chen-Becker dchenbec...@gmail.comwrote: I've been trying to at least provide an object name

[Lift] Re: how to add object into session scope in lift

2009-04-30 Thread Andrew Scherpbier
Derek, That's awesome. I want to help. What can I do? I can start by proof reading stuff. --Andrew Derek Chen-Becker wrote: Updating docs are a high priority for me (an my TODO). I'm working on the proof copy of the APress book today and tomorrow but next week I'm going to start adding

[Lift] Re: how to add object into session scope in lift

2009-04-29 Thread pravin karne
hi, i want some explanation for following code object sessionObj extends SessionVar[HashMap[String, Int]]( new HashMap[String, Int] { override def default(key: String): Int = 0 } ) 1. how object extends class in scala.? 2. are we going to create object of

[Lift] Re: how to add object into session scope in lift

2009-04-29 Thread pravin karne
what is the is+ method sessionObj.is+ (foo - 1) how it differ from sessionObj.is(foo - 1) On Tue, Apr 28, 2009 at 8:33 PM, David Pollak feeder.of.the.be...@gmail.com wrote: On Tue, Apr 28, 2009 at 5:30 AM, pravin pravinka...@gmail.com wrote: Hi guys, I want to add objects into

[Lift] Re: how to add object into session scope in lift

2009-04-29 Thread Timothy Perrett
1. Object is like a static class in Java ­ but better. 2. Its not instantionation in that sense, so by proxy not creation 3. Scala objects have an apply method, of which, MyObject() is a shortcut to. Think of it as being the same as MyObject.apply(...) etc. 4. It is indeed a subtype similar to

[Lift] Re: how to add object into session scope in lift

2009-04-29 Thread David Pollak
On Tue, Apr 28, 2009 at 10:57 PM, pravin karne pravinka...@gmail.comwrote: what is the is+ method sessionObj.is+ (foo - 1) sessionObj.is gets the contained object from the SessionVar. In this case, that object is a HashMap. The + method is on HashMap:

[Lift] Re: how to add object into session scope in lift

2009-04-29 Thread Charles F. Munat
Wow. This was super helpful even to a not-very-newbie. Thanks! Chas. David Pollak wrote: On Tue, Apr 28, 2009 at 11:07 PM, pravin karne pravinka...@gmail.com mailto:pravinka...@gmail.com wrote: hi, i want some explanation for following code object sessionObj extends

[Lift] Re: how to add object into session scope in lift

2009-04-29 Thread Andrew Scherpbier
I totally concur on the awesome explanation. As a matter of fact, can a committer add some of this stuff (maybe not the scala stuff but the actual explanation of the SessionVar) to the scaladocs of the SessionVar class/object? That would be a great place for this kind of documentation. rant

[Lift] Re: how to add object into session scope in lift

2009-04-28 Thread Timothy Perrett
Try: // this gets you whatever is in the session object so add to it here SessionObj.is Do you specifically need to use Java HashMap? If not, seems like List[(String,Int)] would be more lift-esq. Cheers, Tim On 28/04/2009 13:30, pravin pravinka...@gmail.com wrote: Hi guys, I want to add

[Lift] Re: how to add object into session scope in lift

2009-04-28 Thread Derek Chen-Becker
Or even scala.collection.Map ;) On Tue, Apr 28, 2009 at 7:58 AM, Timothy Perrett timo...@getintheloop.euwrote: Try: // this gets you whatever is in the session object so add to it here SessionObj.is Do you specifically need to use Java HashMap? If not, seems like List[(String,Int)]

[Lift] Re: how to add object into session scope in lift

2009-04-28 Thread David Pollak
On Tue, Apr 28, 2009 at 5:30 AM, pravin pravinka...@gmail.com wrote: Hi guys, I want to add objects into session scope. i am using following code : object sessionObj extends SessionVar[HashMap[String, Int]]( new HashMap[String, Int] { override def default(key: