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 SessionVar class?
3. are we calling constructor of given class?
4. is it similar to java class which extends other class ,and then create
object of subclass?

I am beginner to scala and lift.

On Tue, Apr 28, 2009 at 7:28 PM, Timothy Perrett <timo...@getintheloop.eu>wrote:

>
>
> 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 objects into session scope.
> >
> > i am using following code :
> >
> > object sessionObj extends SessionVar[HashMap[String, Int]](
> >         new HashMap[String, Int]
> >           {
> >            override def default(key: String): Int = 0
> >          }
> > )
> >
> > So as per my understanding :-
> >
> >     1. Session object is of HashMap[String, Int] type.
> >     2. I want to add no of string object into above map so i can
> > access them during my session
> >
> >     correct me if i am wrong
> >
> >
> >    So please let me know how can i add/remove  different String object
> > from session scope with above code snippet
> >
> > Thanks in advance
> >
> > >
> >
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to