Re: [Lift] Re: serving images from a directory

2010-02-27 Thread Jack Widman
Thanks Marius.

On Sat, Feb 27, 2010 at 4:07 AM, Marius  wrote:

> If you want Lift to serve images you should put them in /resources/
> toserve folder and reference them as /classpath/{image file}
>
> If you want to put images say in /img folder at the same level with /
> WEB-INF for example, you just reference tham /img/{image file} ...
> these will not be served by Lift but by web container.
>
> There is no need for SiteMap when serving other resources.
>
>
>
> On Feb 27, 10:53 am, jack  wrote:
> > I would like to access an image on the client via a URL. How do I
> > generate that URL. Currently, I'm getting the error
> >
> > The requested page was not defined in your SiteMap, so access was
> > blocked.
> >
> > I understand what this error means for html pages. How does it work
> > for images?
> >
> > Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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] serving images from a directory

2010-02-27 Thread jack
I would like to access an image on the client via a URL. How do I
generate that URL. Currently, I'm getting the error

The requested page was not defined in your SiteMap, so access was
blocked.

I understand what this error means for html pages. How does it work
for images?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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] heapsize

2009-12-17 Thread jack
How do I increase the heapsize in Lift?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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] load testing a lift application

2009-12-15 Thread jack
I need to load test my site. It uses Comet. I am trying JMeter but I'm
not sure if it will work with Comet. The application I am testing is
basically a search engine that returns results via Comet.
What is a good tool to load and stress test this?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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: error locating template/main

2009-12-15 Thread jack
never mind :)

On Dec 16, 1:09 am, jack  wrote:
> Without changing any code, I just got this error. The template main is
> where it always was. Any ideas?
>
> Error locating template/main.
> Message::1:6: < expected
>
> scala.xml.dtd.ValidationException: :1:6: <
> expectednet.liftweb.util.PCDataXmlParser.reportSyntaxError
> (PCDataMarkupParser.scala:169)
> scala.xml.parsing.MarkupParser$class.reportSyntaxError
> (MarkupParser.scala:1117)
> net.liftweb.util.PCDataXmlParser.reportSyntaxError
> (PCDataMarkupParser.scala:92)
> scala.xml.parsing.MarkupParser$class.document(MarkupParser.scala:186)
> net.liftweb.util.PCDataXmlParser.document(PCDataMarkupParser.scala:92)
> etc

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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] error locating template/main

2009-12-15 Thread jack
Without changing any code, I just got this error. The template main is
where it always was. Any ideas?

Error locating template/main.
Message::1:6: < expected

scala.xml.dtd.ValidationException: :1:6: <
expectednet.liftweb.util.PCDataXmlParser.reportSyntaxError
(PCDataMarkupParser.scala:169)
scala.xml.parsing.MarkupParser$class.reportSyntaxError
(MarkupParser.scala:1117)
net.liftweb.util.PCDataXmlParser.reportSyntaxError
(PCDataMarkupParser.scala:92)
scala.xml.parsing.MarkupParser$class.document(MarkupParser.scala:186)
net.liftweb.util.PCDataXmlParser.document(PCDataMarkupParser.scala:92)
etc

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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] fsc and Lift

2009-11-27 Thread jack
Does anybody use fsc instead of scalac? I find scalac slow. Are there
any known issues with using fsc with Lift?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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.




Re: [Lift] Re: simple database question

2009-11-26 Thread Jack Widman
excellent. Thanks. Just what I needed.

On Thu, Nov 26, 2009 at 2:34 PM, harryh  wrote:

> Here is what you need for a minimal Person table that contains two
> columns: an id for the primary key, and name which is a string:
>
> package com.jacksdomain.model
>
> import net.liftweb.mapper._
>
> class Person extends LongKeyedMapper[Person] with IdPK {
>  def getSingleton = Person
>
>  object name extends MappedString(this, 100)
> }
>
> object Person extends Person with LongKeyedMetaMapper[Person] {
>  override def dbTableName = "person"
> }
>
> You can then do things like this:
>
> val person = Person.find(1)   // retrieve the person with id = 1 from
> the database
> val person = Person.find(By(Person.name, "Jack")) // retrieve the
> person with name = "Jack" from the database
> val people = Person.findAll() // retrieve all people form the database
> val people = Person.findAll(By_<(Person.id, 10)) // retrieve all the
> people with id < 10
>
> etc.
>
> -harryh
>
> On Nov 26, 1:39 pm, jack  wrote:
> > wow. thats impressive. But for this, what does the Person class have
> > to look like? Suppose I have the table but I don't have the Person
> > class written. What does it need to look like?
> >
> > On Nov 26, 1:32 pm, harryh  wrote:
> >
> > > val people = Person.findAll()
> >
> > > On Nov 26, 1:22 pm, jack  wrote:
> >
> > > > I have my database configured properly in Boot.scala and in my
> > > > pom.xml. Suppose I have a table name person with a field called name.
> > > > What is the simple code to return all rows of this table using
> Mapper.
> > > > I want to understand the essence of how lift ties tables to objects
> > > > with a simple example.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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.
>
>
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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: simple database question

2009-11-26 Thread jack
wow. thats impressive. But for this, what does the Person class have
to look like? Suppose I have the table but I don't have the Person
class written. What does it need to look like?

On Nov 26, 1:32 pm, harryh  wrote:
> val people = Person.findAll()
>
> On Nov 26, 1:22 pm, jack  wrote:
>
> > I have my database configured properly in Boot.scala and in my
> > pom.xml. Suppose I have a table name person with a field called name.
> > What is the simple code to return all rows of this table using Mapper.
> > I want to understand the essence of how lift ties tables to objects
> > with a simple example.

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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] simple database question

2009-11-26 Thread jack
I have my database configured properly in Boot.scala and in my
pom.xml. Suppose I have a table name person with a field called name.
What is the simple code to return all rows of this table using Mapper.
I want to understand the essence of how lift ties tables to objects
with a simple example.

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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] derby

2009-11-25 Thread jack
Could somebody point me to a quickstart or tutorial about how to use
Derby with Lift?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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: partialUpdate

2009-11-25 Thread jack
Just to clarify: the render function takes the list 'pages' and
transforms it into HTML.

On Nov 25, 11:25 am, jack  wrote:
> I have the following method in a CometActor
>
> override def highPriority = {
>     case Tick(page) => {
>       pages = processPages(pages,page)
>       reRender(false)
>     }
>   }
>
> where pages is a list of Page objects.
>
> How do I make this into a partialUpdate. I looked at the chat example
> but do not see how to do it in this case.

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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] partialUpdate

2009-11-25 Thread jack
I have the following method in a CometActor

override def highPriority = {
case Tick(page) => {
  pages = processPages(pages,page)
  reRender(false)
}
  }

where pages is a list of Page objects.

How do I make this into a partialUpdate. I looked at the chat example
but do not see how to do it in this case.

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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.




Re: [Lift] Re: session variable question

2009-11-23 Thread Jack Widman
Thanks Tim. I didn't know S.init has to be called explicitly. This can be
called from anywhere?

On Mon, Nov 23, 2009 at 8:19 AM, Timothy Perrett wrote:

> Jack,
>
> 1.
> object MyThing extends SessionVar[Box[String]](Empty)
>
> Im using Box[String] here, but you can use whatever types you want...
>
> 2. They can be anything (classes, actors, objects), provided they are in
> session scope (that is, S.init has been called)
>
> Cheers, Tim
>
> On 23 Nov 2009, at 13:15, jack wrote:
>
> > To give more information, I have two questions.
> > 1) I want to define and set a  session  variable in Class A and read
> > it in Class B. What is the code?
> > 2) Can A and B be arbitrary classes or do they have to be snippets?
> >
> >
> > On Nov 22, 9:14 pm, jack  wrote:
> >> I defined a session variable like this
> >>
> >> object isAdminVar extends SessionVar[Box[Boolean]](Empty)
> >>
> >> in a class. I set it to true in that same class upon successful login
> >> and then access it in another class but it is coming out false.
> >>
> >> I am accessing it with
> >>
> >> isAdminVar.is.openOr(false)
> >>
> >> Am I missing something obvious?
> >
> > --
> >
> > You received this message because you are subscribed to the Google Groups
> "Lift" group.
> > To post to this group, send email to lift...@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=.
> >
> >
> >
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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=.
>
>
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Re: session variable question

2009-11-23 Thread jack
To give more information, I have two questions.
1) I want to define and set a  session  variable in Class A and read
it in Class B. What is the code?
2) Can A and B be arbitrary classes or do they have to be snippets?


On Nov 22, 9:14 pm, jack  wrote:
> I defined a session variable like this
>
> object isAdminVar extends SessionVar[Box[Boolean]](Empty)
>
> in a class. I set it to true in that same class upon successful login
> and then access it in another class but it is coming out false.
>
> I am accessing it with
>
> isAdminVar.is.openOr(false)
>
> Am I missing something obvious?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] session variable question

2009-11-22 Thread jack
I defined a session variable like this

object isAdminVar extends SessionVar[Box[Boolean]](Empty)

in a class. I set it to true in that same class upon successful login
and then access it in another class but it is coming out false.

I am accessing it with

isAdminVar.is.openOr(false)

Am I missing something obvious?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] opening new window from snippet.

2009-11-22 Thread jack
I want to put a link in a snippet that opens up a web page in a new
browser window. What is the best way to do this?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] input box in comet actor page resetting.

2009-11-22 Thread jack
I have a comet actor page with an html input box. When ever the comet
page gets rerendered, the contents of the input box disappear. What
should I do?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: InputStream to String

2009-11-21 Thread Jack Widman
How about

pleaseGoOutAndConvertThisInputStreamToAStringAndReturnIt

And then after returns the String you can call a function called

thankYou

On Sat, Nov 21, 2009 at 10:40 AM, Timothy Perrett
wrote:

> HAHAHA. That is an awesome method name if ever i did see one. Little
> confused why "readWholeInputStream" was somehow not the obvious
> choice ;-)
>
> Cheers, Tim
>
> On Nov 21, 4:37 pm, Jack Widman  wrote:
> > I kind of like it. Says exactly what it does :)
> >
> > On Sat, Nov 21, 2009 at 9:56 AM, David Pollak <
> feeder.of.the.be...@gmail.com
> >
> >
> >
> >
> >
> > > wrote:
> > > Helpers.readWholeThing(reader): String
> >
> > > Yes... this method name is ripe for bettering.
> >
> > > On Sat, Nov 21, 2009 at 6:47 AM, jack  wrote:
> >
> > >> I have seen this problem around and it seems basic but I haven't found
> > >> a solution. I need to turn an InputStream into a String. There seems
> > >> to be a bug in the Source class that fails for large files so I don't
> > >> want to use that (though it is an elegant approach).
> >
> > >> The following doesn't work because reader.readLine returns Unit and
> > >> not null, as in Java.
> >
> > >>  val reader = new BufferedReader(new InputStreamReader(is))
> > >>  var responseBody = ""
> >
> > >>  var line = reader.readLine()
> >
> > >>  while(line != null){
> > >>responseBody  += line
> > >>line = reader.readLine()
> > >>  }
> >
> > >> return responseBody
> >
> > >> What to do?
> >
> > >> --
> >
> > >> You received this message because you are subscribed to the Google
> Groups
> > >> "Lift" group.
> > >> To post to this group, send email to lift...@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=.
> >
> > > --
> > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > Follow me:http://twitter.com/dpp
> > > Surf the harmonics
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Lift" group.
> > > To post to this group, send email to lift...@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=.
> >
> > --
> > Jack Widman
> >
> > co-founder / cto,  Authoritude, Inc.
> >
> > 203-641-9355
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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=.
>
>
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] InputStream to String

2009-11-21 Thread Jack Widman
I kind of like it. Says exactly what it does :)

On Sat, Nov 21, 2009 at 9:56 AM, David Pollak  wrote:

> Helpers.readWholeThing(reader): String
>
> Yes... this method name is ripe for bettering.
>
>
> On Sat, Nov 21, 2009 at 6:47 AM, jack  wrote:
>
>> I have seen this problem around and it seems basic but I haven't found
>> a solution. I need to turn an InputStream into a String. There seems
>> to be a bug in the Source class that fails for large files so I don't
>> want to use that (though it is an elegant approach).
>>
>> The following doesn't work because reader.readLine returns Unit and
>> not null, as in Java.
>>
>>  val reader = new BufferedReader(new InputStreamReader(is))
>>  var responseBody = ""
>>
>>  var line = reader.readLine()
>>
>>  while(line != null){
>>responseBody  += line
>>line = reader.readLine()
>>  }
>>
>> return responseBody
>>
>> What to do?
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups
>> "Lift" group.
>> To post to this group, send email to lift...@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=.
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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=.
>



-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] InputStream to String

2009-11-21 Thread jack
I have seen this problem around and it seems basic but I haven't found
a solution. I need to turn an InputStream into a String. There seems
to be a bug in the Source class that fails for large files so I don't
want to use that (though it is an elegant approach).

The following doesn't work because reader.readLine returns Unit and
not null, as in Java.

 val reader = new BufferedReader(new InputStreamReader(is))
 var responseBody = ""

 var line = reader.readLine()

 while(line != null){
responseBody  += line
line = reader.readLine()
 }

return responseBody

What to do?

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: Menu generated from database?

2009-11-19 Thread Jack Widman
This is one of thing that is so amazing about the lift community David. You
apologize for not getting to something today. [?]

On Thu, Nov 19, 2009 at 12:56 PM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

> Philip & list,
>
> I've had it on my to-do list to write up an example... and haven't...
> but...
>
> In your Loc, you can override def supplimentalKidMenuItems and dynamically
> generate kid menu items.
>
> I'll try to get to an example but not today... sorry :-(
>
> Thanks,
>
> David
>
>
> On Thu, Nov 19, 2009 at 12:35 AM, philip  wrote:
>
>>
>> Hi David,
>>
>> Since I am programming a CMS for my client, I need my lift menu to
>> come from the database.
>>
>> LiftRules.setSiteMap(SiteMap(MenuInfo.menu :_*))
>>
>>  def menu: List[Menu] =
>>  {
>>Log.info("Menu called")
>> ...
>>
>> It seems my menu function only gets called once, on subsquent calls I
>> do not get any log message.
>>
>> Maybe I have to subclass SiteMap?
>>
>> Can you point me in the right direction?
>>
>> Thanks, Philip
>>
>>
>>
>> On 10月21日, 下午11時20分, David Pollak 
>> wrote:
>> > I owe the list example code to do this... maybe tomorrow.
>> >
>> > On Wed, Oct 21, 2009 at 6:26 AM, philip  wrote:
>> >
>> > > Hi,
>> >
>> > > How can I get a Liftweb menu to be generated from database content?
>> >
>> > > Alternatively, can the menu come from a XML datasource? could I load/
>> > > serialize from that?
>> > > Could it change dynamically at any time?
>> >
>> > > Thanks, Philip
>> >
>> > --
>> > Lift, the simply functional web frameworkhttp://liftweb.net
>> > Beginning Scalahttp://www.apress.com/book/view/1430219890
>> > Follow me:http://twitter.com/dpp
>> > Surf the harmonics
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups
>> "Lift" group.
>> To post to this group, send email to lift...@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=.
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
>
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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=.
>



-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.


<<330.gif>>

Re: [Lift] Re: Call it Lift 2.0

2009-11-17 Thread Jack Widman
ints.  I have been a
> nanny-less single parent for nearly the past month.  Derek is traveling
> with
> his family and Marius and Tim are busy at work.  Debby's been occupied with
> other gigs so I have less process help than I usually do.  I have to
> balance
> between debates, supporting the increasing number of production sites (and,
> yes, Naftoli, I have supported your production site... I was sitting in
> this
> line: http://www.uplifting.me/the-h1n1-vaccine-line coding fixes for your
> tickets to receive a "the names you chose, they're not so good" feedback
> from you), the Scala 2.8 port, and the flood of newbies on the list.  So,
> yeah, I don't spend 2+ hours a day debating... I make shorter fuse
> decisions.
>
> But, the "it's DPP's ball and he'll do with it what he wants" kind of
> feedback bugs me at a very, very core level.
>
>
> > -
> > Jonathan Ferguson wrote:
> >
> > I was thinking about this earlier, if there is to be a 2.0 I would hope
> > there was a chance to remove deprecated code.
> >
>
> Which particular deprecated code are you thinking.
>
>
> > Also consider making breaking
> > changes @dpp hasn't been in favour of making to date.
> >
>
> Which changes are you thinking about?
>
>
> > Not to annoy him. As
> > 1.X to 2.X is a big enough change that people who don't want to move can
> > stay with a stable 1.X and those of us who are running HEAD/TRUNK
> whatever
> > these new fangled git kids call it nowadays can keep racing along.
> >
>
> I'm not sure we have the resources to support a 1.X and a 2.X and a 2.7.x
> and a 2.8.x branch.  If there are any folks who want to step up and
> maintain
> a branch (or if there's money to hire someone), it's something worth a
> discussion, but I don't think there's anyone I know of who could maintain a
> 1.X branch if we're going to get radical with a 2.X.  I think it's one
> branch.
>
>
> >
> > Jono.
> >
> > 2009/11/17 Heiko Seeberger 
> >
> > > 2009/11/17 David Pollak 
> > >
> > >> The current Lift is not a major change to Lift 1.0, it's a minor
> > >> progression and a lot of tuning of the developer experience.
> > >>
> > >
> > > There are breaking changes to the API which in the version policy
> > suggested
> > > by me (the OSGi way) means increasing the major version number. OK, of
> > > course we need not stick to this particular version policy, but it
> would
> > be
> > > beneficial to have one. What about: Increasing the minor version number
> > > (e.g. 1.0 -> 1.1) means breaking changes to the API. Increasing the
> micro
> > > version number (e.g. 1.1.0 -> 1.1.1) means *no* breaking changes to the
> > API.
> > >
> > > Heiko
> > >
> > >
> > > My job: weiglewilczek.com
> > > My blog: heikoseeberger.name
> > > Follow me: twitter.com/hseeberger
> > > OSGi on Scala: scalamodules.org
> > > Lift, the simply functional web framework: liftweb.net
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Lift" group.
> > > To post to this group, send email to lift...@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=.
> > >
> >
> > --
> >
> > You received this message because you are subscribed to the Google Groups
> > "Lift" group.
> > To post to this group, send email to lift...@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=.
> >
> >
> > --
> >
> > You received this message because you are subscribed to the Google Groups
> > "Lift" group.
> > To post to this group, send email to lift...@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=.
> >
> >
> >
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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=.
>
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lift...@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=.
>
>
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




Re: [Lift] Re: How do I properly read a value from a cookie?

2009-11-16 Thread Jack Widman
gt; > if(c != null) {
>> > > >   var v = c.Value
>> > > >   // Do something with the cookie
>> > > > }
>> >
>> > > > I fail to see why Lift should be more complicated.
>> >
>> > > > This is with Lift 1.1 M7
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups
>> "Lift" group.
>> To post to this group, send email to lift...@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=.
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
>
> To post to this group, send email to lift...@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=.
>



-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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=.




[Lift] Re: CometListener

2009-11-13 Thread Jack Widman
Thanks Ross.

On Fri, Nov 13, 2009 at 11:55 PM, Ross Mellgren  wrote:

> Your pom specifies lift 1.0, not 1.1 for the majority of lift modules. You
> are using 1.1-M6 for lift-textile. In addition, you don't have the snapshots
> repository configured.
>
> To fix this, first add the snapshot repository to :
>
> 
>   scala-tools.org.snapshots
>   Scala-Tools Maven2 Repository for Snapshots
>   http://scala-tools.org/repo-snapshots
>   
> 
>
> Then switch *all* your lift-* dependencies to 1.1-SNAPSHOT and your scala
> version to 2.7.7. I use a property for the lift version to use, myself, like
> this:
>
> 
> 2.7.7
> 1.1-SNAPSHOT
> 
>
> ...
>
> 
> net.liftweb
> lift-util
> ${lift.version} 
>
> (and so on, for each lift-* dependency)
>
> I'm not sure what would happen exactly if you have mixed versions of the
> lift modules, but It Can't Be Good.
>
> Hope that helps,
> -Ross
>
> On Nov 13, 2009, at 10:17 PM, Jack Widman wrote:
>
> Here is my pom.xml
>
> On Fri, Nov 13, 2009 at 12:09 PM, Jack Widman wrote:
>
>> sure. Thanks Ross. I will send it tonight. Also what is the difference
>> between the CometListener and the CometListenee?
>>
>>
>> On Fri, Nov 13, 2009 at 11:14 AM, Ross Mellgren  wrote:
>>
>>> Could you send over your pom.xml if you're using Maven? It sounds like
>>> maybe your build path is not correct.
>>>
>>> -Ross
>>>
>>>
>>> On Nov 13, 2009, at 12:09 AM, Jack Widman wrote:
>>>
>>> David,
>>>
>>> I'm using lift 1.1 and scala 2.5 now and the compiler says it cant find
>>> CometListener when I import net.liftweb.http._
>>>
>>> Jack
>>>
>>> On Fri, Nov 13, 2009 at 12:01 AM, David Pollak <
>>> feeder.of.the.be...@gmail.com> wrote:
>>>
>>>>
>>>>
>>>> On Thu, Nov 12, 2009 at 8:54 PM, Jack Widman wrote:
>>>>
>>>>> C:\work\widman\src\main\scala\com\widman\comet\PackComet.scala:20:
>>>>> error: type CometListener is not a member of package net.liftweb.http
>>>>>
>>>>> I got this compile error.
>>>>>
>>>>> I must be missing something obvious.
>>>>
>>>>
>>>> It's part of Lift 1.1, not Lift 1.0
>>>>
>>>>
>>>>>
>>>>>
>>>>>  On Thu, Nov 12, 2009 at 11:42 PM, Ross Mellgren wrote:
>>>>>
>>>>>>
>>>>>> It is in net.liftweb.http.
>>>>>>
>>>>>>
>>>>>> http://www.scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scaladocs/net/liftweb/http/CometListener.html
>>>>>>
>>>>>>
>>>>>> By the way, the link you gave only indicates it's in either
>>>>>> net.liftweb.http, net.liftweb.util, net.liftweb or model (or a couple
>>>>>> other packages, since scala implicitly imports superpackages).
>>>>>>
>>>>>> -Ross
>>>>>>
>>>>>> On Nov 12, 2009, at 11:38 PM, jack wrote:
>>>>>>
>>>>>> >
>>>>>> > I also tried net.liftweb.http
>>>>>> >
>>>>>> > On Nov 12, 11:35 pm, jack  wrote:
>>>>>> >> I am trying to use CometListener. According tohttp://bit.ly/1Wnxt4
>>>>>> ,
>>>>>> >> it is in the package net.liftweb._ but compiler says it can't be
>>>>>> >> found. Is this the wrong package?
>>>>>> > >
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Jack Widman
>>>>>
>>>>> co-founder / cto,  Authoritude, Inc.
>>>>>
>>>>> 203-641-9355
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Lift, the simply functional web framework http://liftweb.net
>>>> Beginning Scala http://www.apress.com/book/view/1430219890
>>>> Follow me: http://twitter.com/dpp
>>>> Surf the harmonics
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Jack Widman
>>>
>>> co-founder / cto,  Authoritude, Inc.
>>>
>>> 203-641-9355
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Jack Widman
>>
>> co-founder / cto,  Authoritude, Inc.
>>
>> 203-641-9355
>>
>
>
>
> --
> Jack Widman
>
> co-founder / cto,  Authoritude, Inc.
>
> 203-641-9355
>
>
> 
>
>
>
> >
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--~--~-~--~~~---~--~~
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] Comet Actor

2009-11-13 Thread jack

I have a some code in a CometActor that I want to run right after
render is called for the first time. What is the best way to do this?
I could set a boolean variable in the render method and then send a
message back to the CometActor to tell it to run the code. I suspect
there is a better way?
--~--~-~--~~~---~--~~
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: CometListener

2009-11-13 Thread Jack Widman
Here is my pom.xml

On Fri, Nov 13, 2009 at 12:09 PM, Jack Widman  wrote:

> sure. Thanks Ross. I will send it tonight. Also what is the difference
> between the CometListener and the CometListenee?
>
>
> On Fri, Nov 13, 2009 at 11:14 AM, Ross Mellgren  wrote:
>
>> Could you send over your pom.xml if you're using Maven? It sounds like
>> maybe your build path is not correct.
>>
>> -Ross
>>
>>
>> On Nov 13, 2009, at 12:09 AM, Jack Widman wrote:
>>
>> David,
>>
>> I'm using lift 1.1 and scala 2.5 now and the compiler says it cant find
>> CometListener when I import net.liftweb.http._
>>
>> Jack
>>
>> On Fri, Nov 13, 2009 at 12:01 AM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Thu, Nov 12, 2009 at 8:54 PM, Jack Widman wrote:
>>>
>>>> C:\work\widman\src\main\scala\com\widman\comet\PackComet.scala:20:
>>>> error: type CometListener is not a member of package net.liftweb.http
>>>>
>>>> I got this compile error.
>>>>
>>>> I must be missing something obvious.
>>>
>>>
>>> It's part of Lift 1.1, not Lift 1.0
>>>
>>>
>>>>
>>>>
>>>>  On Thu, Nov 12, 2009 at 11:42 PM, Ross Mellgren wrote:
>>>>
>>>>>
>>>>> It is in net.liftweb.http.
>>>>>
>>>>>
>>>>> http://www.scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scaladocs/net/liftweb/http/CometListener.html
>>>>>
>>>>>
>>>>> By the way, the link you gave only indicates it's in either
>>>>> net.liftweb.http, net.liftweb.util, net.liftweb or model (or a couple
>>>>> other packages, since scala implicitly imports superpackages).
>>>>>
>>>>> -Ross
>>>>>
>>>>> On Nov 12, 2009, at 11:38 PM, jack wrote:
>>>>>
>>>>> >
>>>>> > I also tried net.liftweb.http
>>>>> >
>>>>> > On Nov 12, 11:35 pm, jack  wrote:
>>>>> >> I am trying to use CometListener. According tohttp://bit.ly/1Wnxt4,
>>>>> >> it is in the package net.liftweb._ but compiler says it can't be
>>>>> >> found. Is this the wrong package?
>>>>> > >
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Jack Widman
>>>>
>>>> co-founder / cto,  Authoritude, Inc.
>>>>
>>>> 203-641-9355
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Lift, the simply functional web framework http://liftweb.net
>>> Beginning Scala http://www.apress.com/book/view/1430219890
>>> Follow me: http://twitter.com/dpp
>>> Surf the harmonics
>>>
>>>
>>>
>>
>>
>> --
>> Jack Widman
>>
>> co-founder / cto,  Authoritude, Inc.
>>
>> 203-641-9355
>>
>>
>>
>>
>> >>
>>
>
>
> --
> Jack Widman
>
> co-founder / cto,  Authoritude, Inc.
>
> 203-641-9355
>



-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

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


http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
  4.0.0
  com.widman
  widman
  1.1-M6
  war
  widman
  2007
  
2.7.5
  

  

  scala-tools.org
  Scala-Tools Maven2 Repository
  http://scala-tools.org/repo-releases

  

  

  scala-tools.org
  Scala-Tools Maven2 Repository
  http://scala-tools.org/repo-releases

  

  

   net.liftweb
   lift-textile
   1.1-M6


  org.scala-lang
  scala-library
  ${scala.version}


  net.liftweb
  lift-util
  1.0


  net.liftweb
  lift-webkit
  1.0


  net.liftweb
  lift-mapper
  1.0


  javax.se

[Lift] priority of events

2009-11-13 Thread jack

What is the order that the following three things happen in?

1)localSetup
2)the first time render is called
3)a piece of code in the CometActor that is not inside any method.
--~--~-~--~~~---~--~~
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: CometListener

2009-11-13 Thread Jack Widman
sure. Thanks Ross. I will send it tonight. Also what is the difference
between the CometListener and the CometListenee?

On Fri, Nov 13, 2009 at 11:14 AM, Ross Mellgren  wrote:

> Could you send over your pom.xml if you're using Maven? It sounds like
> maybe your build path is not correct.
>
> -Ross
>
>
> On Nov 13, 2009, at 12:09 AM, Jack Widman wrote:
>
> David,
>
> I'm using lift 1.1 and scala 2.5 now and the compiler says it cant find
> CometListener when I import net.liftweb.http._
>
> Jack
>
> On Fri, Nov 13, 2009 at 12:01 AM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>>
>>
>> On Thu, Nov 12, 2009 at 8:54 PM, Jack Widman wrote:
>>
>>> C:\work\widman\src\main\scala\com\widman\comet\PackComet.scala:20: error:
>>> type CometListener is not a member of package net.liftweb.http
>>>
>>> I got this compile error.
>>>
>>> I must be missing something obvious.
>>
>>
>> It's part of Lift 1.1, not Lift 1.0
>>
>>
>>>
>>>
>>>  On Thu, Nov 12, 2009 at 11:42 PM, Ross Mellgren wrote:
>>>
>>>>
>>>> It is in net.liftweb.http.
>>>>
>>>>
>>>> http://www.scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scaladocs/net/liftweb/http/CometListener.html
>>>>
>>>>
>>>> By the way, the link you gave only indicates it's in either
>>>> net.liftweb.http, net.liftweb.util, net.liftweb or model (or a couple
>>>> other packages, since scala implicitly imports superpackages).
>>>>
>>>> -Ross
>>>>
>>>> On Nov 12, 2009, at 11:38 PM, jack wrote:
>>>>
>>>> >
>>>> > I also tried net.liftweb.http
>>>> >
>>>> > On Nov 12, 11:35 pm, jack  wrote:
>>>> >> I am trying to use CometListener. According tohttp://bit.ly/1Wnxt4,
>>>> >> it is in the package net.liftweb._ but compiler says it can't be
>>>> >> found. Is this the wrong package?
>>>> > >
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Jack Widman
>>>
>>> co-founder / cto,  Authoritude, Inc.
>>>
>>> 203-641-9355
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Lift, the simply functional web framework http://liftweb.net
>> Beginning Scala http://www.apress.com/book/view/1430219890
>> Follow me: http://twitter.com/dpp
>> Surf the harmonics
>>
>>
>>
>
>
> --
> Jack Widman
>
> co-founder / cto,  Authoritude, Inc.
>
> 203-641-9355
>
>
>
>
> >
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

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

2009-11-12 Thread Jack Widman
David,

I'm using lift 1.1 and scala 2.5 now and the compiler says it cant find
CometListener when I import net.liftweb.http._

Jack

On Fri, Nov 13, 2009 at 12:01 AM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

>
>
> On Thu, Nov 12, 2009 at 8:54 PM, Jack Widman wrote:
>
>> C:\work\widman\src\main\scala\com\widman\comet\PackComet.scala:20: error:
>> type CometListener is not a member of package net.liftweb.http
>>
>> I got this compile error.
>>
>> I must be missing something obvious.
>
>
> It's part of Lift 1.1, not Lift 1.0
>
>
>>
>>
>>  On Thu, Nov 12, 2009 at 11:42 PM, Ross Mellgren wrote:
>>
>>>
>>> It is in net.liftweb.http.
>>>
>>>
>>> http://www.scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scaladocs/net/liftweb/http/CometListener.html
>>>
>>>
>>> By the way, the link you gave only indicates it's in either
>>> net.liftweb.http, net.liftweb.util, net.liftweb or model (or a couple
>>> other packages, since scala implicitly imports superpackages).
>>>
>>> -Ross
>>>
>>> On Nov 12, 2009, at 11:38 PM, jack wrote:
>>>
>>> >
>>> > I also tried net.liftweb.http
>>> >
>>> > On Nov 12, 11:35 pm, jack  wrote:
>>> >> I am trying to use CometListener. According tohttp://bit.ly/1Wnxt4,
>>> >> it is in the package net.liftweb._ but compiler says it can't be
>>> >> found. Is this the wrong package?
>>> > >
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Jack Widman
>>
>> co-founder / cto,  Authoritude, Inc.
>>
>> 203-641-9355
>>
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> >
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--~--~-~--~~~---~--~~
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] scala version

2009-11-12 Thread jack

I'm using lift version 1.1-M6. Which version of scala do I need? In
general, how do I know which version of Scala to use?
--~--~-~--~~~---~--~~
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: CometListener

2009-11-12 Thread Jack Widman
C:\work\widman\src\main\scala\com\widman\comet\PackComet.scala:20: error:
type CometListener is not a member of package net.liftweb.http

I got this compile error.

I must be missing something obvious.

On Thu, Nov 12, 2009 at 11:42 PM, Ross Mellgren  wrote:

>
> It is in net.liftweb.http.
>
>
> http://www.scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scaladocs/net/liftweb/http/CometListener.html
>
>
> By the way, the link you gave only indicates it's in either
> net.liftweb.http, net.liftweb.util, net.liftweb or model (or a couple
> other packages, since scala implicitly imports superpackages).
>
> -Ross
>
> On Nov 12, 2009, at 11:38 PM, jack wrote:
>
> >
> > I also tried net.liftweb.http
> >
> > On Nov 12, 11:35 pm, jack  wrote:
> >> I am trying to use CometListener. According tohttp://bit.ly/1Wnxt4,
> >> it is in the package net.liftweb._ but compiler says it can't be
> >> found. Is this the wrong package?
> > >
>
>
> >
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

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

2009-11-12 Thread jack

I also tried net.liftweb.http

On Nov 12, 11:35 pm, jack  wrote:
> I am trying to use CometListener. According tohttp://bit.ly/1Wnxt4,
> it is in the package net.liftweb._ but compiler says it can't be
> found. Is this the wrong package?
--~--~-~--~~~---~--~~
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] CometListener

2009-11-12 Thread jack

I am trying to use CometListener. According to http://bit.ly/1Wnxt4 ,
it is in the package net.liftweb._ but compiler says it can't be
found. Is this the wrong package?
--~--~-~--~~~---~--~~
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: CometActor and render

2009-11-12 Thread Jack Widman
got it. I was mixing metaphors.

On Thu, Nov 12, 2009 at 5:41 PM, David Pollak  wrote:

>
>
> On Thu, Nov 12, 2009 at 2:25 PM, Jack Widman wrote:
>
>> Is it that I am putting things on a Queue from within an the Calculator
>> Actor and having the CometActor retrieve them from the Queue? Is that the
>> problem?  I will read up on actors but it would help if you could tell me
>> (if only briefly) what you saw about my actor code that is wrong.
>>
>
> The act method in an actor sets up the receive/react loop.  It is not a
> "background thread" in and of itself.  Actors are not "background threads"
> they are things that process messages sent to them with the ! method.  You
> set up the message handling in the receive/react loop.
>
> Further, mixing method calls and Actor message handling is wicked dangerous
> (especially without synchronized blocks).  Choose either a traditional
> threading model or an Actor-based model, but not both.
>
>
>>  Thanks.
>>
>>
>>
>> On Thu, Nov 12, 2009 at 5:12 PM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>> Jack,
>>>
>>> The issues you're seeing are not Lift related.  You are not using Actors
>>> correctly.  Please see Philipp Haller's preso on Actors:
>>> http://lamp.epfl.ch/~phaller/doc/ScalaActors.pdf<http://lamp.epfl.ch/%7Ephaller/doc/ScalaActors.pdf>
>>>
>>> Please also look at the Actor chapters in Beginning Scala or Programming
>>> in Scala.
>>>
>>> Thanks,
>>>
>>> David
>>>
>>>
>>> On Wed, Nov 11, 2009 at 8:26 PM, Jack Widman wrote:
>>>
>>>> David,
>>>>
>>>> I have attached my code. It runs but does not behave as I intended it
>>>> to. The code does a web search on the term "scala" and displays a list of
>>>> URLs of the results. Next to each URL it says "Page Length : -1". A process
>>>> is running in the background which takes each URL, goes out and gets the
>>>> page and takes the length of the page. The length of that page is then
>>>> supposed to immediately appear on the page next to that URL. I put the
>>>> lengths on a queue, as they come in, and I have the Comet page poll the
>>>> queue and display the results. It would probably be better to have the
>>>> results send a message to the Comet class so the page is only re-rendered
>>>> when there is a change but for now I am polling.
>>>>
>>>> I can see the lengths coming in and being put on the queue, but the
>>>> Comet page is not getting them till they are all retrieved. (This takes way
>>>> too long and nothing changes on the screen till its too late). I need them
>>>> to appear as they come in. Occasionally I can see a length being retrieved
>>>> and the Comet page finds it but even then it is not displayed until all the
>>>> lengths are in.   I know this is not very clear but I think it will be 
>>>> clear
>>>> from the code.
>>>>
>>>> I also know there are a lot of places in the code which can be improved
>>>> and I welcome all of your input but what I would love is to have these
>>>> numbers appear on the page as they they are retrieved. I have been stumped
>>>> by this for a while and I suspect that somebody who knows Lift well might
>>>> see the problem right away.
>>>>
>>>> The class that retrieves the page lengths is called Calculator and the
>>>> queue is called SourceQueue. The classes are pretty small so hopefully it
>>>> will be clear what is going on. I want you to know I think it is incredible
>>>> how responsive you and the group are and I look forward to using Lift in 
>>>> the
>>>> future.
>>>>
>>>> Thanks so much.
>>>>
>>>> Jack
>>>>
>>>>
>>>> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
>>>> feeder.of.the.be...@gmail.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>>>>>
>>>>>> The only difference between your working code and mine is that mine
>>>>>> has a process in the background that is always running and puts Foo 
>>>>>> objects
>>>>>> on a queue whenever they are ready. Where can I start this long running
>>>>>> process so that it doesn't interfe

[Lift] Re: CometActor and render

2009-11-12 Thread Jack Widman
Thanks.

On Thu, Nov 12, 2009 at 5:32 PM, David Pollak  wrote:

>
>
> On Thu, Nov 12, 2009 at 2:16 PM, Jack Widman wrote:
>
>> Will do. One more small question How do I send a message to the Comet
>> Actor from another class? Can the CometActor be an object instead of a
>> class? In the code
>>
>
> Lift instantiates a new CometActor each time it needs one.  If you have a
> singleton CometActor, you'd be sharing state across all sessions and that
> would be impossible to manage.
>
>
>>
>> X ! messageToCometActor,   what is X? I don't have a variable that holds
>> the instance of the CometActor.
>
>
> If the CometActor is a listener to another service, you can register the
> instance of the CometActor as a listener during localSetup and unregister
> during localShutdown.
>
> See that Chat example in lift-examples/example
>
>
>>
>>
>> On Thu, Nov 12, 2009 at 5:12 PM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>> Jack,
>>>
>>> The issues you're seeing are not Lift related.  You are not using Actors
>>> correctly.  Please see Philipp Haller's preso on Actors:
>>> http://lamp.epfl.ch/~phaller/doc/ScalaActors.pdf<http://lamp.epfl.ch/%7Ephaller/doc/ScalaActors.pdf>
>>>
>>> Please also look at the Actor chapters in Beginning Scala or Programming
>>> in Scala.
>>>
>>> Thanks,
>>>
>>> David
>>>
>>>
>>> On Wed, Nov 11, 2009 at 8:26 PM, Jack Widman wrote:
>>>
>>>> David,
>>>>
>>>> I have attached my code. It runs but does not behave as I intended it
>>>> to. The code does a web search on the term "scala" and displays a list of
>>>> URLs of the results. Next to each URL it says "Page Length : -1". A process
>>>> is running in the background which takes each URL, goes out and gets the
>>>> page and takes the length of the page. The length of that page is then
>>>> supposed to immediately appear on the page next to that URL. I put the
>>>> lengths on a queue, as they come in, and I have the Comet page poll the
>>>> queue and display the results. It would probably be better to have the
>>>> results send a message to the Comet class so the page is only re-rendered
>>>> when there is a change but for now I am polling.
>>>>
>>>> I can see the lengths coming in and being put on the queue, but the
>>>> Comet page is not getting them till they are all retrieved. (This takes way
>>>> too long and nothing changes on the screen till its too late). I need them
>>>> to appear as they come in. Occasionally I can see a length being retrieved
>>>> and the Comet page finds it but even then it is not displayed until all the
>>>> lengths are in.   I know this is not very clear but I think it will be 
>>>> clear
>>>> from the code.
>>>>
>>>> I also know there are a lot of places in the code which can be improved
>>>> and I welcome all of your input but what I would love is to have these
>>>> numbers appear on the page as they they are retrieved. I have been stumped
>>>> by this for a while and I suspect that somebody who knows Lift well might
>>>> see the problem right away.
>>>>
>>>> The class that retrieves the page lengths is called Calculator and the
>>>> queue is called SourceQueue. The classes are pretty small so hopefully it
>>>> will be clear what is going on. I want you to know I think it is incredible
>>>> how responsive you and the group are and I look forward to using Lift in 
>>>> the
>>>> future.
>>>>
>>>> Thanks so much.
>>>>
>>>> Jack
>>>>
>>>>
>>>> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
>>>> feeder.of.the.be...@gmail.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>>>>>
>>>>>> The only difference between your working code and mine is that mine
>>>>>> has a process in the background that is always running and puts Foo 
>>>>>> objects
>>>>>> on a queue whenever they are ready. Where can I start this long running
>>>>>> process so that it doesn't interfere with the lowPriority method that 
>>>>>> takes
>>>>>> things off the queue and rerenders

[Lift] Re: CometActor and render

2009-11-12 Thread Jack Widman
Is it that I am putting things on a Queue from within an the Calculator
Actor and having the CometActor retrieve them from the Queue? Is that the
problem?  I will read up on actors but it would help if you could tell me
(if only briefly) what you saw about my actor code that is wrong.
 Thanks.


On Thu, Nov 12, 2009 at 5:12 PM, David Pollak  wrote:

> Jack,
>
> The issues you're seeing are not Lift related.  You are not using Actors
> correctly.  Please see Philipp Haller's preso on Actors:
> http://lamp.epfl.ch/~phaller/doc/ScalaActors.pdf<http://lamp.epfl.ch/%7Ephaller/doc/ScalaActors.pdf>
>
> Please also look at the Actor chapters in Beginning Scala or Programming in
> Scala.
>
> Thanks,
>
> David
>
>
> On Wed, Nov 11, 2009 at 8:26 PM, Jack Widman wrote:
>
>> David,
>>
>> I have attached my code. It runs but does not behave as I intended it to.
>> The code does a web search on the term "scala" and displays a list of URLs
>> of the results. Next to each URL it says "Page Length : -1". A process is
>> running in the background which takes each URL, goes out and gets the page
>> and takes the length of the page. The length of that page is then supposed
>> to immediately appear on the page next to that URL. I put the lengths on a
>> queue, as they come in, and I have the Comet page poll the queue and display
>> the results. It would probably be better to have the results send a message
>> to the Comet class so the page is only re-rendered when there is a change
>> but for now I am polling.
>>
>> I can see the lengths coming in and being put on the queue, but the Comet
>> page is not getting them till they are all retrieved. (This takes way too
>> long and nothing changes on the screen till its too late). I need them to
>> appear as they come in. Occasionally I can see a length being retrieved and
>> the Comet page finds it but even then it is not displayed until all the
>> lengths are in.   I know this is not very clear but I think it will be clear
>> from the code.
>>
>> I also know there are a lot of places in the code which can be improved
>> and I welcome all of your input but what I would love is to have these
>> numbers appear on the page as they they are retrieved. I have been stumped
>> by this for a while and I suspect that somebody who knows Lift well might
>> see the problem right away.
>>
>> The class that retrieves the page lengths is called Calculator and the
>> queue is called SourceQueue. The classes are pretty small so hopefully it
>> will be clear what is going on. I want you to know I think it is incredible
>> how responsive you and the group are and I look forward to using Lift in the
>> future.
>>
>> Thanks so much.
>>
>> Jack
>>
>>
>> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>>>
>>>> The only difference between your working code and mine is that mine has
>>>> a process in the background that is always running and puts Foo objects on 
>>>> a
>>>> queue whenever they are ready. Where can I start this long running process
>>>> so that it doesn't interfere with the lowPriority method that takes things
>>>> off the queue and rerenders the page. I tried starting the process in its
>>>> own Actor that I start in localSetup but it seems somehow to be blocking 
>>>> the
>>>> lowPriority method from doing its thing.
>>>>
>>>
>>> I have no idea what this means... sorry.
>>>
>>> Please post actual runnable code and we can help you debug.
>>>
>>>
>>>>
>>>> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
>>>> feeder.of.the.be...@gmail.com> wrote:
>>>>
>>>>> Jack,
>>>>>
>>>>> I reproduced your code and it seems to work fine.  I've enclosed a
>>>>> working copy.
>>>>>
>>>>> Some comments about your code:
>>>>>
>>>>>- The foos variable and the foo variable may be getting confused in
>>>>>the code... the render method may be rendering the same thing based on 
>>>>> the
>>>>>unchanging foos variable.
>>>>>- Doing null testing is a sign that you have logic errors in your
>>>>>code.  I strongly recommend using either Box or Option for everything 
>>>>> tha

[Lift] Re: CometActor and render

2009-11-12 Thread Jack Widman
Will do. One more small question How do I send a message to the Comet Actor
from another class? Can the CometActor be an object instead of a class? In
the code

X ! messageToCometActor,   what is X? I don't have a variable that holds the
instance of the CometActor.

On Thu, Nov 12, 2009 at 5:12 PM, David Pollak  wrote:

> Jack,
>
> The issues you're seeing are not Lift related.  You are not using Actors
> correctly.  Please see Philipp Haller's preso on Actors:
> http://lamp.epfl.ch/~phaller/doc/ScalaActors.pdf<http://lamp.epfl.ch/%7Ephaller/doc/ScalaActors.pdf>
>
> Please also look at the Actor chapters in Beginning Scala or Programming in
> Scala.
>
> Thanks,
>
> David
>
>
> On Wed, Nov 11, 2009 at 8:26 PM, Jack Widman wrote:
>
>> David,
>>
>> I have attached my code. It runs but does not behave as I intended it to.
>> The code does a web search on the term "scala" and displays a list of URLs
>> of the results. Next to each URL it says "Page Length : -1". A process is
>> running in the background which takes each URL, goes out and gets the page
>> and takes the length of the page. The length of that page is then supposed
>> to immediately appear on the page next to that URL. I put the lengths on a
>> queue, as they come in, and I have the Comet page poll the queue and display
>> the results. It would probably be better to have the results send a message
>> to the Comet class so the page is only re-rendered when there is a change
>> but for now I am polling.
>>
>> I can see the lengths coming in and being put on the queue, but the Comet
>> page is not getting them till they are all retrieved. (This takes way too
>> long and nothing changes on the screen till its too late). I need them to
>> appear as they come in. Occasionally I can see a length being retrieved and
>> the Comet page finds it but even then it is not displayed until all the
>> lengths are in.   I know this is not very clear but I think it will be clear
>> from the code.
>>
>> I also know there are a lot of places in the code which can be improved
>> and I welcome all of your input but what I would love is to have these
>> numbers appear on the page as they they are retrieved. I have been stumped
>> by this for a while and I suspect that somebody who knows Lift well might
>> see the problem right away.
>>
>> The class that retrieves the page lengths is called Calculator and the
>> queue is called SourceQueue. The classes are pretty small so hopefully it
>> will be clear what is going on. I want you to know I think it is incredible
>> how responsive you and the group are and I look forward to using Lift in the
>> future.
>>
>> Thanks so much.
>>
>> Jack
>>
>>
>> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>>>
>>>> The only difference between your working code and mine is that mine has
>>>> a process in the background that is always running and puts Foo objects on 
>>>> a
>>>> queue whenever they are ready. Where can I start this long running process
>>>> so that it doesn't interfere with the lowPriority method that takes things
>>>> off the queue and rerenders the page. I tried starting the process in its
>>>> own Actor that I start in localSetup but it seems somehow to be blocking 
>>>> the
>>>> lowPriority method from doing its thing.
>>>>
>>>
>>> I have no idea what this means... sorry.
>>>
>>> Please post actual runnable code and we can help you debug.
>>>
>>>
>>>>
>>>> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
>>>> feeder.of.the.be...@gmail.com> wrote:
>>>>
>>>>> Jack,
>>>>>
>>>>> I reproduced your code and it seems to work fine.  I've enclosed a
>>>>> working copy.
>>>>>
>>>>> Some comments about your code:
>>>>>
>>>>>- The foos variable and the foo variable may be getting confused in
>>>>>the code... the render method may be rendering the same thing based on 
>>>>> the
>>>>>unchanging foos variable.
>>>>>- Doing null testing is a sign that you have logic errors in your
>>>>>code.  I strongly recommend using either Box or Option for everything 
>>>>> that
>>>>>can logicall

[Lift] Re: CometActor and render

2009-11-12 Thread Jack Widman
Ok. I actually had this problem before I upgraded to M6.

On Thu, Nov 12, 2009 at 5:03 PM, David Pollak  wrote:

> Jack,
>
> Your pom.xml file mixes Scala 2.7.3, Lift 1.0 and Lift 1.1-M6... this
> doesn't work.
>
> You have to be running with the same version of Lift.
>
> I'll look at the actual code and report more in a little while.
>
> Thanks,
>
> David
>
>
> On Wed, Nov 11, 2009 at 8:26 PM, Jack Widman wrote:
>
>> David,
>>
>> I have attached my code. It runs but does not behave as I intended it to.
>> The code does a web search on the term "scala" and displays a list of URLs
>> of the results. Next to each URL it says "Page Length : -1". A process is
>> running in the background which takes each URL, goes out and gets the page
>> and takes the length of the page. The length of that page is then supposed
>> to immediately appear on the page next to that URL. I put the lengths on a
>> queue, as they come in, and I have the Comet page poll the queue and display
>> the results. It would probably be better to have the results send a message
>> to the Comet class so the page is only re-rendered when there is a change
>> but for now I am polling.
>>
>> I can see the lengths coming in and being put on the queue, but the Comet
>> page is not getting them till they are all retrieved. (This takes way too
>> long and nothing changes on the screen till its too late). I need them to
>> appear as they come in. Occasionally I can see a length being retrieved and
>> the Comet page finds it but even then it is not displayed until all the
>> lengths are in.   I know this is not very clear but I think it will be clear
>> from the code.
>>
>> I also know there are a lot of places in the code which can be improved
>> and I welcome all of your input but what I would love is to have these
>> numbers appear on the page as they they are retrieved. I have been stumped
>> by this for a while and I suspect that somebody who knows Lift well might
>> see the problem right away.
>>
>> The class that retrieves the page lengths is called Calculator and the
>> queue is called SourceQueue. The classes are pretty small so hopefully it
>> will be clear what is going on. I want you to know I think it is incredible
>> how responsive you and the group are and I look forward to using Lift in the
>> future.
>>
>> Thanks so much.
>>
>> Jack
>>
>>
>> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>>>
>>>> The only difference between your working code and mine is that mine has
>>>> a process in the background that is always running and puts Foo objects on 
>>>> a
>>>> queue whenever they are ready. Where can I start this long running process
>>>> so that it doesn't interfere with the lowPriority method that takes things
>>>> off the queue and rerenders the page. I tried starting the process in its
>>>> own Actor that I start in localSetup but it seems somehow to be blocking 
>>>> the
>>>> lowPriority method from doing its thing.
>>>>
>>>
>>> I have no idea what this means... sorry.
>>>
>>> Please post actual runnable code and we can help you debug.
>>>
>>>
>>>>
>>>> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
>>>> feeder.of.the.be...@gmail.com> wrote:
>>>>
>>>>> Jack,
>>>>>
>>>>> I reproduced your code and it seems to work fine.  I've enclosed a
>>>>> working copy.
>>>>>
>>>>> Some comments about your code:
>>>>>
>>>>>- The foos variable and the foo variable may be getting confused in
>>>>>the code... the render method may be rendering the same thing based on 
>>>>> the
>>>>>unchanging foos variable.
>>>>>- Doing null testing is a sign that you have logic errors in your
>>>>>code.  I strongly recommend using either Box or Option for everything 
>>>>> that
>>>>>can logically not contain a value/reference.  If you're bridging out 
>>>>> to Java
>>>>>code and are expecting null from the Java code, write a small bridge 
>>>>> that
>>>>>will wrapper the Java return values in Box/Option.
>>>>>- You have

[Lift] Re: CometActor and render

2009-11-12 Thread jack

David,

I hope its clear from the code what the problem is. If you want me to,
I will give a more detailed description of how the code is supposed to
work.

Jack

On Nov 11, 11:26 pm, Jack Widman  wrote:
> David,
>
> I have attached my code. It runs but does not behave as I intended it to.
> The code does a web search on the term "scala" and displays a list of URLs
> of the results. Next to each URL it says "Page Length : -1". A process is
> running in the background which takes each URL, goes out and gets the page
> and takes the length of the page. The length of that page is then supposed
> to immediately appear on the page next to that URL. I put the lengths on a
> queue, as they come in, and I have the Comet page poll the queue and display
> the results. It would probably be better to have the results send a message
> to the Comet class so the page is only re-rendered when there is a change
> but for now I am polling.
>
> I can see the lengths coming in and being put on the queue, but the Comet
> page is not getting them till they are all retrieved. (This takes way too
> long and nothing changes on the screen till its too late). I need them to
> appear as they come in. Occasionally I can see a length being retrieved and
> the Comet page finds it but even then it is not displayed until all the
> lengths are in.   I know this is not very clear but I think it will be clear
> from the code.
>
> I also know there are a lot of places in the code which can be improved and
> I welcome all of your input but what I would love is to have these numbers
> appear on the page as they they are retrieved. I have been stumped by this
> for a while and I suspect that somebody who knows Lift well might see the
> problem right away.
>
> The class that retrieves the page lengths is called Calculator and the queue
> is called SourceQueue. The classes are pretty small so hopefully it will be
> clear what is going on. I want you to know I think it is incredible how
> responsive you and the group are and I look forward to using Lift in the
> future.
>
> Thanks so much.
>
> Jack
>
> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak 
> > wrote:
>
> > On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>
> >> The only difference between your working code and mine is that mine has a
> >> process in the background that is always running and puts Foo objects on a
> >> queue whenever they are ready. Where can I start this long running process
> >> so that it doesn't interfere with the lowPriority method that takes things
> >> off the queue and rerenders the page. I tried starting the process in its
> >> own Actor that I start in localSetup but it seems somehow to be blocking 
> >> the
> >> lowPriority method from doing its thing.
>
> > I have no idea what this means... sorry.
>
> > Please post actual runnable code and we can help you debug.
>
> >> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
> >> feeder.of.the.be...@gmail.com> wrote:
>
> >>> Jack,
>
> >>> I reproduced your code and it seems to work fine.  I've enclosed a
> >>> working copy.
>
> >>> Some comments about your code:
>
> >>>    - The foos variable and the foo variable may be getting confused in
> >>>    the code... the render method may be rendering the same thing based on 
> >>> the
> >>>    unchanging foos variable.
> >>>    - Doing null testing is a sign that you have logic errors in your
> >>>    code.  I strongly recommend using either Box or Option for everything 
> >>> that
> >>>    can logically not contain a value/reference.  If you're bridging out 
> >>> to Java
> >>>    code and are expecting null from the Java code, write a small bridge 
> >>> that
> >>>    will wrapper the Java return values in Box/Option.
> >>>    - You have a case class (Tick) that contains no parameters.  Please
> >>>    use a case object instead.
> >>>    - Your Tick look is a spin loop.  You fire a Tick message as part of
> >>>    processing the Tick message.  I would suggest that if you're polling, 
> >>> that
> >>>    you have a reasonable poll interval, otherwise you'll starve your CPU.
> >>>    Further, having reRender on each loop through means that you're 
> >>> forcing a
> >>>    lot of bytes over the wire rather than only doing a reRender on changed
> >>>    values.
>
> >>> Thanks,
>
> >>> David
>
> >>> O

[Lift] Re: CometActor and render

2009-11-12 Thread Jack Widman
I did and its actually in the code I attached. In one place I use Dispatch
and in another place I use httpclient directly. I intend to use Dispatch for
everything.

On Thu, Nov 12, 2009 at 4:05 PM, Randinn  wrote:

>
> I'm not trying to change the subject but I was wondering if you looked
> at Databinder Dispatch http://databinder.net/dispatch/About for your
> url calls?
>
> On Nov 12, 3:26 pm, Jack Widman  wrote:
> > David,
> >
> > I have attached my code. It runs but does not behave as I intended it to.
> > The code does a web search on the term "scala" and displays a list of
> URLs
> > of the results. Next to each URL it says "Page Length : -1". A process is
> > running in the background which takes each URL, goes out and gets the
> page
> > and takes the length of the page. The length of that page is then
> supposed
> > to immediately appear on the page next to that URL. I put the lengths on
> a
> > queue, as they come in, and I have the Comet page poll the queue and
> display
> > the results. It would probably be better to have the results send a
> message
> > to the Comet class so the page is only re-rendered when there is a change
> > but for now I am polling.
> >
> > I can see the lengths coming in and being put on the queue, but the Comet
> > page is not getting them till they are all retrieved. (This takes way too
> > long and nothing changes on the screen till its too late). I need them to
> > appear as they come in. Occasionally I can see a length being retrieved
> and
> > the Comet page finds it but even then it is not displayed until all the
> > lengths are in.   I know this is not very clear but I think it will be
> clear
> > from the code.
> >
> > I also know there are a lot of places in the code which can be improved
> and
> > I welcome all of your input but what I would love is to have these
> numbers
> > appear on the page as they they are retrieved. I have been stumped by
> this
> > for a while and I suspect that somebody who knows Lift well might see the
> > problem right away.
> >
> > The class that retrieves the page lengths is called Calculator and the
> queue
> > is called SourceQueue. The classes are pretty small so hopefully it will
> be
> > clear what is going on. I want you to know I think it is incredible how
> > responsive you and the group are and I look forward to using Lift in the
> > future.
> >
> > Thanks so much.
> >
> > Jack
> >
> > On Tue, Nov 10, 2009 at 1:27 AM, David Pollak <
> feeder.of.the.be...@gmail.com
> >
> > > wrote:
> >
> > > On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman  >wrote:
> >
> > >> The only difference between your working code and mine is that mine
> has a
> > >> process in the background that is always running and puts Foo objects
> on a
> > >> queue whenever they are ready. Where can I start this long running
> process
> > >> so that it doesn't interfere with the lowPriority method that takes
> things
> > >> off the queue and rerenders the page. I tried starting the process in
> its
> > >> own Actor that I start in localSetup but it seems somehow to be
> blocking the
> > >> lowPriority method from doing its thing.
> >
> > > I have no idea what this means... sorry.
> >
> > > Please post actual runnable code and we can help you debug.
> >
> > >> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
> > >> feeder.of.the.be...@gmail.com> wrote:
> >
> > >>> Jack,
> >
> > >>> I reproduced your code and it seems to work fine.  I've enclosed a
> > >>> working copy.
> >
> > >>> Some comments about your code:
> >
> > >>>- The foos variable and the foo variable may be getting confused
> in
> > >>>the code... the render method may be rendering the same thing
> based on the
> > >>>unchanging foos variable.
> > >>>- Doing null testing is a sign that you have logic errors in your
> > >>>code.  I strongly recommend using either Box or Option for
> everything that
> > >>>can logically not contain a value/reference.  If you're bridging
> out to Java
> > >>>code and are expecting null from the Java code, write a small
> bridge that
> > >>>will wrapper the Java return values in Box/Option.
> > >>>- You have a case class (Tick) that contains no parameters.
>  Please
> >

[Lift] Re: CometActor and render

2009-11-11 Thread jack

one more thing: I also ran the code without the piece that retrieves
web pages and gets their length. Instead I just had the Calculator
class sleep for 10 seconds (which is longer than the http request
takes) and then return a random number. This worked fine. I can't see
what the difference is.

On Nov 11, 11:26 pm, Jack Widman  wrote:
> David,
>
> I have attached my code. It runs but does not behave as I intended it to.
> The code does a web search on the term "scala" and displays a list of URLs
> of the results. Next to each URL it says "Page Length : -1". A process is
> running in the background which takes each URL, goes out and gets the page
> and takes the length of the page. The length of that page is then supposed
> to immediately appear on the page next to that URL. I put the lengths on a
> queue, as they come in, and I have the Comet page poll the queue and display
> the results. It would probably be better to have the results send a message
> to the Comet class so the page is only re-rendered when there is a change
> but for now I am polling.
>
> I can see the lengths coming in and being put on the queue, but the Comet
> page is not getting them till they are all retrieved. (This takes way too
> long and nothing changes on the screen till its too late). I need them to
> appear as they come in. Occasionally I can see a length being retrieved and
> the Comet page finds it but even then it is not displayed until all the
> lengths are in.   I know this is not very clear but I think it will be clear
> from the code.
>
> I also know there are a lot of places in the code which can be improved and
> I welcome all of your input but what I would love is to have these numbers
> appear on the page as they they are retrieved. I have been stumped by this
> for a while and I suspect that somebody who knows Lift well might see the
> problem right away.
>
> The class that retrieves the page lengths is called Calculator and the queue
> is called SourceQueue. The classes are pretty small so hopefully it will be
> clear what is going on. I want you to know I think it is incredible how
> responsive you and the group are and I look forward to using Lift in the
> future.
>
> Thanks so much.
>
> Jack
>
> On Tue, Nov 10, 2009 at 1:27 AM, David Pollak 
> > wrote:
>
> > On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>
> >> The only difference between your working code and mine is that mine has a
> >> process in the background that is always running and puts Foo objects on a
> >> queue whenever they are ready. Where can I start this long running process
> >> so that it doesn't interfere with the lowPriority method that takes things
> >> off the queue and rerenders the page. I tried starting the process in its
> >> own Actor that I start in localSetup but it seems somehow to be blocking 
> >> the
> >> lowPriority method from doing its thing.
>
> > I have no idea what this means... sorry.
>
> > Please post actual runnable code and we can help you debug.
>
> >> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
> >> feeder.of.the.be...@gmail.com> wrote:
>
> >>> Jack,
>
> >>> I reproduced your code and it seems to work fine.  I've enclosed a
> >>> working copy.
>
> >>> Some comments about your code:
>
> >>>    - The foos variable and the foo variable may be getting confused in
> >>>    the code... the render method may be rendering the same thing based on 
> >>> the
> >>>    unchanging foos variable.
> >>>    - Doing null testing is a sign that you have logic errors in your
> >>>    code.  I strongly recommend using either Box or Option for everything 
> >>> that
> >>>    can logically not contain a value/reference.  If you're bridging out 
> >>> to Java
> >>>    code and are expecting null from the Java code, write a small bridge 
> >>> that
> >>>    will wrapper the Java return values in Box/Option.
> >>>    - You have a case class (Tick) that contains no parameters.  Please
> >>>    use a case object instead.
> >>>    - Your Tick look is a spin loop.  You fire a Tick message as part of
> >>>    processing the Tick message.  I would suggest that if you're polling, 
> >>> that
> >>>    you have a reasonable poll interval, otherwise you'll starve your CPU.
> >>>    Further, having reRender on each loop through means that you're 
> >>> forcing a
> >>>    lot of bytes over the wire rather than only doing a reRender on c

[Lift] Re: CometActor and render

2009-11-10 Thread Jack Widman
Sorry. Just reread my past post and it is indeed unclear. I will post
running code tonight. I very much appreciate your help.

On Tue, Nov 10, 2009 at 1:27 AM, David Pollak  wrote:

>
>
> On Mon, Nov 9, 2009 at 10:10 PM, Jack Widman wrote:
>
>> The only difference between your working code and mine is that mine has a
>> process in the background that is always running and puts Foo objects on a
>> queue whenever they are ready. Where can I start this long running process
>> so that it doesn't interfere with the lowPriority method that takes things
>> off the queue and rerenders the page. I tried starting the process in its
>> own Actor that I start in localSetup but it seems somehow to be blocking the
>> lowPriority method from doing its thing.
>>
>
> I have no idea what this means... sorry.
>
> Please post actual runnable code and we can help you debug.
>
>
>>
>> On Sun, Nov 8, 2009 at 11:35 PM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>> Jack,
>>>
>>> I reproduced your code and it seems to work fine.  I've enclosed a
>>> working copy.
>>>
>>> Some comments about your code:
>>>
>>>- The foos variable and the foo variable may be getting confused in
>>>the code... the render method may be rendering the same thing based on 
>>> the
>>>unchanging foos variable.
>>>- Doing null testing is a sign that you have logic errors in your
>>>code.  I strongly recommend using either Box or Option for everything 
>>> that
>>>can logically not contain a value/reference.  If you're bridging out to 
>>> Java
>>>code and are expecting null from the Java code, write a small bridge that
>>>will wrapper the Java return values in Box/Option.
>>>- You have a case class (Tick) that contains no parameters.  Please
>>>use a case object instead.
>>>- Your Tick look is a spin loop.  You fire a Tick message as part of
>>>processing the Tick message.  I would suggest that if you're polling, 
>>> that
>>>you have a reasonable poll interval, otherwise you'll starve your CPU.
>>>Further, having reRender on each loop through means that you're forcing a
>>>lot of bytes over the wire rather than only doing a reRender on changed
>>>values.
>>>
>>> Thanks,
>>>
>>> David
>>>
>>> On Sun, Nov 8, 2009 at 3:47 PM, Jack Widman wrote:
>>>
>>>> Sorry. Here it is:   As I said, I know that when render is called,
>>>> foo.getValue has the right value. But it does not show on the screen, 
>>>> unless
>>>> I refresh the browser.
>>>>
>>>> package com.foo.comet
>>>>
>>>> import net.liftweb._
>>>> import http._
>>>> import js._
>>>> import JsCmds._
>>>> import net.liftweb.util._
>>>> import net.liftweb.http._
>>>> import _root_.scala.xml._
>>>> import scala.actors._
>>>> import com.authoritude.snippet._
>>>> import scala.collection.mutable.Queue
>>>> import net.liftweb.http.SessionVar
>>>>
>>>>
>>>> class MyComet extends CometActor {
>>>>
>>>>   override def defaultPrefix = Full("auth")
>>>>
>>>>   private var foos = FooManager.getFoos
>>>>
>>>>   def createDisplay(foos:List[Foo]):NodeSeq = {
>>>> 
>>>> {
>>>>   for {foo <- foos} yield {foo.getValue}
>>>> }
>>>>
>>>> 
>>>>   }
>>>>
>>>>   def render = { bind("foo" -> createDisplay(foos)) }
>>>>
>>>>   override def localSetup = {
>>>> super.localSetup
>>>> this ! Tick
>>>>   }
>>>>
>>>>   var foo:Foo = null
>>>>   override def lowPriority = {
>>>> case Tick => {
>>>>   foo=FooQueue.getLatest
>>>>   if (foo!=null && foo.getValue > -1) {
>>>> blogs = FooManager.process(foo, foos)
>>>>   } else if (foo!=null){
>>>> foos = foos.remove((f:Foo)=>(f.id==foo.id))
>>>>   }
>>>>   reRender(false)
>>>>   this ! Tick
>>>> }
>>>>   }
>>>> }
>>>>
>>>> case class Tick
>>>>
>>&g

[Lift] Re: CometActor and render

2009-11-09 Thread Jack Widman
The only difference between your working code and mine is that mine has a
process in the background that is always running and puts Foo objects on a
queue whenever they are ready. Where can I start this long running process
so that it doesn't interfere with the lowPriority method that takes things
off the queue and rerenders the page. I tried starting the process in its
own Actor that I start in localSetup but it seems somehow to be blocking the
lowPriority method from doing its thing.

On Sun, Nov 8, 2009 at 11:35 PM, David Pollak  wrote:

> Jack,
>
> I reproduced your code and it seems to work fine.  I've enclosed a working
> copy.
>
> Some comments about your code:
>
>- The foos variable and the foo variable may be getting confused in the
>code... the render method may be rendering the same thing based on the
>unchanging foos variable.
>- Doing null testing is a sign that you have logic errors in your
>code.  I strongly recommend using either Box or Option for everything that
>can logically not contain a value/reference.  If you're bridging out to 
> Java
>code and are expecting null from the Java code, write a small bridge that
>will wrapper the Java return values in Box/Option.
>- You have a case class (Tick) that contains no parameters.  Please use
>a case object instead.
>- Your Tick look is a spin loop.  You fire a Tick message as part of
>processing the Tick message.  I would suggest that if you're polling, that
>you have a reasonable poll interval, otherwise you'll starve your CPU.
>Further, having reRender on each loop through means that you're forcing a
>lot of bytes over the wire rather than only doing a reRender on changed
>values.
>
> Thanks,
>
> David
>
> On Sun, Nov 8, 2009 at 3:47 PM, Jack Widman  wrote:
>
>> Sorry. Here it is:   As I said, I know that when render is called,
>> foo.getValue has the right value. But it does not show on the screen, unless
>> I refresh the browser.
>>
>> package com.foo.comet
>>
>> import net.liftweb._
>> import http._
>> import js._
>> import JsCmds._
>> import net.liftweb.util._
>> import net.liftweb.http._
>> import _root_.scala.xml._
>> import scala.actors._
>> import com.authoritude.snippet._
>> import scala.collection.mutable.Queue
>> import net.liftweb.http.SessionVar
>>
>>
>> class MyComet extends CometActor {
>>
>>   override def defaultPrefix = Full("auth")
>>
>>   private var foos = FooManager.getFoos
>>
>>   def createDisplay(foos:List[Foo]):NodeSeq = {
>> 
>> {
>>   for {foo <- foos} yield {foo.getValue}
>> }
>>
>> 
>>   }
>>
>>   def render = { bind("foo" -> createDisplay(foos)) }
>>
>>   override def localSetup = {
>> super.localSetup
>> this ! Tick
>>   }
>>
>>   var foo:Foo = null
>>   override def lowPriority = {
>> case Tick => {
>>   foo=FooQueue.getLatest
>>   if (foo!=null && foo.getValue > -1) {
>> blogs = FooManager.process(foo, foos)
>>   } else if (foo!=null){
>> foos = foos.remove((f:Foo)=>(f.id==foo.id))
>>   }
>>   reRender(false)
>>   this ! Tick
>> }
>>   }
>> }
>>
>> case class Tick
>>
>>
>>
>> On Sun, Nov 8, 2009 at 5:31 AM, Timothy Perrett 
>> wrote:
>>
>>>
>>> Without posting your code it's going to be tough to help you.
>>>
>>> Cheers, Tim
>>>
>>> Sent from my iPhone
>>>
>>> On 8 Nov 2009, at 08:14, jack  wrote:
>>>
>>> >
>>> > By the way, I know that when render is called, all the variables have
>>> > the right values. I just don't see it on the screen unless I refresh
>>> > it.
>>> >
>>> > On Nov 8, 3:12 am, jack  wrote:
>>> >> I have a CometActor. render is called when it is supposed to be but I
>>> >> don't see the changes. If I refresh the page at anytime, I do see the
>>> >> changes. Any idea what might cause this?
>>> > >
>>> >
>>>
>>>
>>>
>>
>>
>> --
>> Jack Widman
>>
>> co-founder / cto,  Authoritude, Inc.
>>
>> 203-641-9355
>>
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
>
> >
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--~--~-~--~~~---~--~~
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: CometActor and render

2009-11-08 Thread Jack Widman
Thanks David. This is a big help. Can you tell me exactly how lowPriority,
mediumPriorty and highPriority work? When are they called?

On Sun, Nov 8, 2009 at 11:35 PM, David Pollak  wrote:

> Jack,
>
> I reproduced your code and it seems to work fine.  I've enclosed a working
> copy.
>
> Some comments about your code:
>
>- The foos variable and the foo variable may be getting confused in the
>code... the render method may be rendering the same thing based on the
>unchanging foos variable.
>- Doing null testing is a sign that you have logic errors in your
>code.  I strongly recommend using either Box or Option for everything that
>can logically not contain a value/reference.  If you're bridging out to 
> Java
>code and are expecting null from the Java code, write a small bridge that
>will wrapper the Java return values in Box/Option.
>- You have a case class (Tick) that contains no parameters.  Please use
>a case object instead.
>- Your Tick look is a spin loop.  You fire a Tick message as part of
>processing the Tick message.  I would suggest that if you're polling, that
>you have a reasonable poll interval, otherwise you'll starve your CPU.
>Further, having reRender on each loop through means that you're forcing a
>lot of bytes over the wire rather than only doing a reRender on changed
>values.
>
> Thanks,
>
> David
>
> On Sun, Nov 8, 2009 at 3:47 PM, Jack Widman  wrote:
>
>> Sorry. Here it is:   As I said, I know that when render is called,
>> foo.getValue has the right value. But it does not show on the screen, unless
>> I refresh the browser.
>>
>> package com.foo.comet
>>
>> import net.liftweb._
>> import http._
>> import js._
>> import JsCmds._
>> import net.liftweb.util._
>> import net.liftweb.http._
>> import _root_.scala.xml._
>> import scala.actors._
>> import com.authoritude.snippet._
>> import scala.collection.mutable.Queue
>> import net.liftweb.http.SessionVar
>>
>>
>> class MyComet extends CometActor {
>>
>>   override def defaultPrefix = Full("auth")
>>
>>   private var foos = FooManager.getFoos
>>
>>   def createDisplay(foos:List[Foo]):NodeSeq = {
>> 
>> {
>>   for {foo <- foos} yield {foo.getValue}
>> }
>>
>> 
>>   }
>>
>>   def render = { bind("foo" -> createDisplay(foos)) }
>>
>>   override def localSetup = {
>> super.localSetup
>> this ! Tick
>>   }
>>
>>   var foo:Foo = null
>>   override def lowPriority = {
>> case Tick => {
>>   foo=FooQueue.getLatest
>>   if (foo!=null && foo.getValue > -1) {
>> blogs = FooManager.process(foo, foos)
>>   } else if (foo!=null){
>> foos = foos.remove((f:Foo)=>(f.id==foo.id))
>>   }
>>   reRender(false)
>>   this ! Tick
>>     }
>>   }
>> }
>>
>> case class Tick
>>
>>
>>
>> On Sun, Nov 8, 2009 at 5:31 AM, Timothy Perrett 
>> wrote:
>>
>>>
>>> Without posting your code it's going to be tough to help you.
>>>
>>> Cheers, Tim
>>>
>>> Sent from my iPhone
>>>
>>> On 8 Nov 2009, at 08:14, jack  wrote:
>>>
>>> >
>>> > By the way, I know that when render is called, all the variables have
>>> > the right values. I just don't see it on the screen unless I refresh
>>> > it.
>>> >
>>> > On Nov 8, 3:12 am, jack  wrote:
>>> >> I have a CometActor. render is called when it is supposed to be but I
>>> >> don't see the changes. If I refresh the page at anytime, I do see the
>>> >> changes. Any idea what might cause this?
>>> > >
>>> >
>>>
>>>
>>>
>>
>>
>> --
>> Jack Widman
>>
>> co-founder / cto,  Authoritude, Inc.
>>
>> 203-641-9355
>>
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
>
> >
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--~--~-~--~~~---~--~~
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: CometActor and render

2009-11-08 Thread jack

One more thing. 'foo's get added to the FooQueue periodically.

On Nov 8, 6:47 pm, Jack Widman  wrote:
> Sorry. Here it is:   As I said, I know that when render is called,
> foo.getValue has the right value. But it does not show on the screen, unless
> I refresh the browser.
>
> package com.foo.comet
>
> import net.liftweb._
> import http._
> import js._
> import JsCmds._
> import net.liftweb.util._
> import net.liftweb.http._
> import _root_.scala.xml._
> import scala.actors._
> import com.authoritude.snippet._
> import scala.collection.mutable.Queue
> import net.liftweb.http.SessionVar
>
> class MyComet extends CometActor {
>
>   override def defaultPrefix = Full("auth")
>
>   private var foos = FooManager.getFoos
>
>   def createDisplay(foos:List[Foo]):NodeSeq = {
>     
>     {
>       for {foo <- foos} yield {foo.getValue}
>     }
>
>     
>   }
>
>   def render = { bind("foo" -> createDisplay(foos)) }
>
>   override def localSetup = {
>     super.localSetup
>     this ! Tick
>   }
>
>   var foo:Foo = null
>   override def lowPriority = {
>     case Tick => {
>       foo=FooQueue.getLatest
>       if (foo!=null && foo.getValue > -1) {
>     blogs = FooManager.process(foo, foos)
>       } else if (foo!=null){
>     foos = foos.remove((f:Foo)=>(f.id==foo.id))
>       }
>       reRender(false)
>       this ! Tick
>     }
>   }
>
> }
>
> case class Tick
>
> On Sun, Nov 8, 2009 at 5:31 AM, Timothy Perrett 
> wrote:
>
>
>
>
>
> > Without posting your code it's going to be tough to help you.
>
> > Cheers, Tim
>
> > Sent from my iPhone
>
> > On 8 Nov 2009, at 08:14, jack  wrote:
>
> > > By the way, I know that when render is called, all the variables have
> > > the right values. I just don't see it on the screen unless I refresh
> > > it.
>
> > > On Nov 8, 3:12 am, jack  wrote:
> > >> I have a CometActor. render is called when it is supposed to be but I
> > >> don't see the changes. If I refresh the page at anytime, I do see the
> > >> changes. Any idea what might cause this?
>
> --
> Jack Widman
>
> co-founder / cto,  Authoritude, Inc.
>
> 203-641-9355
--~--~-~--~~~---~--~~
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: CometActor and render

2009-11-08 Thread Jack Widman
Sorry. Here it is:   As I said, I know that when render is called,
foo.getValue has the right value. But it does not show on the screen, unless
I refresh the browser.

package com.foo.comet

import net.liftweb._
import http._
import js._
import JsCmds._
import net.liftweb.util._
import net.liftweb.http._
import _root_.scala.xml._
import scala.actors._
import com.authoritude.snippet._
import scala.collection.mutable.Queue
import net.liftweb.http.SessionVar


class MyComet extends CometActor {

  override def defaultPrefix = Full("auth")

  private var foos = FooManager.getFoos

  def createDisplay(foos:List[Foo]):NodeSeq = {

{
  for {foo <- foos} yield {foo.getValue}
}


  }

  def render = { bind("foo" -> createDisplay(foos)) }

  override def localSetup = {
super.localSetup
this ! Tick
  }

  var foo:Foo = null
  override def lowPriority = {
case Tick => {
  foo=FooQueue.getLatest
  if (foo!=null && foo.getValue > -1) {
blogs = FooManager.process(foo, foos)
  } else if (foo!=null){
foos = foos.remove((f:Foo)=>(f.id==foo.id))
  }
  reRender(false)
  this ! Tick
}
  }
}

case class Tick


On Sun, Nov 8, 2009 at 5:31 AM, Timothy Perrett wrote:

>
> Without posting your code it's going to be tough to help you.
>
> Cheers, Tim
>
> Sent from my iPhone
>
> On 8 Nov 2009, at 08:14, jack  wrote:
>
> >
> > By the way, I know that when render is called, all the variables have
> > the right values. I just don't see it on the screen unless I refresh
> > it.
> >
> > On Nov 8, 3:12 am, jack  wrote:
> >> I have a CometActor. render is called when it is supposed to be but I
> >> don't see the changes. If I refresh the page at anytime, I do see the
> >> changes. Any idea what might cause this?
> > >
> >
>
> >
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--~--~-~--~~~---~--~~
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: CometActor and render

2009-11-08 Thread jack

By the way, I know that when render is called, all the variables have
the right values. I just don't see it on the screen unless I refresh
it.

On Nov 8, 3:12 am, jack  wrote:
> I have a CometActor. render is called when it is supposed to be but I
> don't see the changes. If I refresh the page at anytime, I do see the
> changes. Any idea what might cause this?
--~--~-~--~~~---~--~~
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] CometActor and render

2009-11-08 Thread jack

I have a CometActor. render is called when it is supposed to be but I
don't see the changes. If I refresh the page at anytime, I do see the
changes. Any idea what might cause this?
--~--~-~--~~~---~--~~
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: using Dispatch library for Http

2009-11-05 Thread Jack Widman
Tried and I see now that the exception is java.nio.BufferUnderflowException
Any idea what might be causing this?

On Thu, Nov 5, 2009 at 11:51 PM, Ross Mellgren  wrote:

>
> Many exceptions do not have a message, e.g. NullPointerException
> (unless thrown by hand).
>
> Maybe:
>
> try {
> ...
> } catch {
> case ex: Exception if ex.getMessage == null => "Message: " +
> ex.toString
>  case ex: Exception => "Message: " + ex.getMessage
> }
>
> -Ross
>
> On Nov 5, 2009, at 11:45 PM, jack wrote:
>
> >
> > I'm using the Dispatch Databinder library for Http.  http://bit.ly/NPWcW
> >
> > My code is this simple method.
> >
> > def testCheckPage(url:String):String = {
> >try {
> >  var http = new Http
> >  var request = new Request
> > (url)
> >  val req_with_agent = request <:< Map("User-Agent" -> "Mozilla/
> > 5.0")
> >  val responseBody = Http (req_with_agent as_str)
> >  responseBody.length.toString
> >} catch {
> >   case ex: Exception => {
> >    "Message: " + ex.getMessage
> >   }
> >}
> >  }
> >
> > For some urls, e.g., http://bae.cf.huffingtonpost.com/ , an exception
> > is thrown but the exception message is null. Any ideas?
> > >
>
>
> >
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--~--~-~--~~~---~--~~
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: using Dispatch library for Http

2009-11-05 Thread Jack Widman
Thanks Ross, I'll try it.

On Thu, Nov 5, 2009 at 11:51 PM, Ross Mellgren  wrote:

>
> Many exceptions do not have a message, e.g. NullPointerException
> (unless thrown by hand).
>
> Maybe:
>
> try {
> ...
> } catch {
> case ex: Exception if ex.getMessage == null => "Message: " +
> ex.toString
> case ex: Exception => "Message: " + ex.getMessage
> }
>
> -Ross
>
> On Nov 5, 2009, at 11:45 PM, jack wrote:
>
> >
> > I'm using the Dispatch Databinder library for Http.  http://bit.ly/NPWcW
> >
> > My code is this simple method.
> >
> > def testCheckPage(url:String):String = {
> >try {
> >  var http = new Http
> >  var request = new Request
> > (url)
> >  val req_with_agent = request <:< Map("User-Agent" -> "Mozilla/
> > 5.0")
> >  val responseBody = Http (req_with_agent as_str)
> >  responseBody.length.toString
> >} catch {
> >   case ex: Exception => {
> >"Message: " + ex.getMessage
> >   }
> >}
> >  }
> >
> > For some urls, e.g., http://bae.cf.huffingtonpost.com/ , an exception
> > is thrown but the exception message is null. Any ideas?
> > >
>
>
> >
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--~--~-~--~~~---~--~~
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] using Dispatch library for Http

2009-11-05 Thread jack

I'm using the Dispatch Databinder library for Http.  http://bit.ly/NPWcW

My code is this simple method.

 def testCheckPage(url:String):String = {
try {
  var http = new Http
  var request = new Request
(url)
  val req_with_agent = request <:< Map("User-Agent" -> "Mozilla/
5.0")
  val responseBody = Http (req_with_agent as_str)
  responseBody.length.toString
} catch {
   case ex: Exception => {
 "Message: " + ex.getMessage
   }
}
  }

For some urls, e.g., http://bae.cf.huffingtonpost.com/ , an exception
is thrown but the exception message is null. Any ideas?
--~--~-~--~~~---~--~~
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: regular expression

2009-11-02 Thread Jack Widman
Thanks Derek. Will do.

On Mon, Nov 2, 2009 at 3:45 PM, Derek Chen-Becker wrote:

> From the Scaladoc for scala.util.matching.Regex:
>
> You can use special pattern syntax construct (?idmsux-idmsux) to switch
> various regex compilation options like CASE_INSENSITIVE or UNICODE_CASE.
> See java.util.regex.Pattern javadoc for details.
>
> Probably better to ask Scala questions on the Scala list(s).
>
>
> On Mon, Nov 2, 2009 at 10:28 AM, jack  wrote:
>
>>
>> I am using the findAllIn function for regular expressions. How do I
>> make it ignore case? I know its simple but I can't find it.
>>
>>
>
> >
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--~--~-~--~~~---~--~~
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] regular expression

2009-11-02 Thread jack

I am using the findAllIn function for regular expressions. How do I
make it ignore case? I know its simple but I can't find it.
--~--~-~--~~~---~--~~
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: global exception page

2009-10-28 Thread Jack Widman
Yes. Thanks alot Tim.

On Wed, Oct 28, 2009 at 9:32 AM, Timothy Perrett wrote:

>
> Jack,
>
> LiftRules.exceptionHandler.prepend {
>   case (Props.RunModes.Production, r, e) => {
> Log.error("IMPORTANT IMPORTANT IMPORTANT: Unhandeled error
> occoured!!",e)
> // your LiftResponse here
>RedirectResponse("/error")
>   }
> }
>
> Does that clear it up for you...?
>
> Cheers, Tim
>
> On 28 Oct 2009, at 13:17, jack wrote:
>
> >
> > I would like to have one error page that appears when any exception
> > occurs. How would I do that?
> > >
> >
>
>
> >
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

--~--~-~--~~~---~--~~
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] global exception page

2009-10-28 Thread jack

I would like to have one error page that appears when any exception
occurs. How would I do that?
--~--~-~--~~~---~--~~
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: 1.1

2009-10-25 Thread Jack Widman
Thanks Tim. And next time I will search more before asking.

On Sun, Oct 25, 2009 at 2:26 PM, Timothy Perrett wrote:

>
> Jack,
>
> This question has been asked quite a number of times recently on list.
>
> Change:
>
> 1.0
>
> on the liftweb dependencies in your pom.xml to be:
>
> 1.1-SNAPSHOT
>
> That will give you the latest HEAD build. If you want a known point in
> time, use M6:
>
> 1.1-M6
>
> Cheers, Tim
>
> On Oct 25, 6:00 pm, jack  wrote:
> > I have been using lift 1.0. What is the best way to upgrade to 1.1?
> >
>


-- 
Jack Widman

co-founder / cto,  Authoritude, Inc.

203-641-9355

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

2009-10-25 Thread jack

I have been using lift 1.0. What is the best way to upgrade to 1.1?
--~--~-~--~~~---~--~~
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] TextileParser

2009-10-24 Thread jack

I am trying to use TextileParser and so I am importing it but I'm
getting the error.

 value textile is not a member of package net.liftweb

What am I missing?

Jack
--~--~-~--~~~---~--~~
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: Newbie post: Where are the basics and best practices?

2009-10-21 Thread Jack Widman
Just wanted to say that I have never seen a community like this. Its
fantastic!

On Wed, Oct 21, 2009 at 11:05 PM, David Pollak <
feeder.of.the.be...@gmail.com> wrote:

>
>
> On Wed, Oct 21, 2009 at 4:15 PM, Strom  wrote:
>
>>
>> Hello everyone,
>> I am pretty much brand new to lift and scala, and I come from a non-
>> framework jsp/java servlet/hibernate background. I've been reading
>> this board, Beginning Scala, The lift book, and googling how to use
>> the lift framework, but I can't seem to find some basic info.
>
>
> That's why we're here.  Ask away!
>
>
>> Please
>> help me out. I know these are very basic questions, and posting on the
>> group was a last resort after coming up empty on searches. I want to
>> start off with best practices since I'm beginning from scratch.
>>
>
> Doing some searching is great, but asking on list is heartily encouraged.
>
>
>>
>> 1. Directory structure - where is everything?
>> Looking at the PocketChange example and making a basic lift 1.0
>> project via netbeans, I know that the DB schema go under "model", the
>> snippets in "snippet", the templates in the corresponding "webapp/
>> templates-hidden" directory, and the web pages in the "webapp"
>> directory.
>>
>> What I don't know is where /classpath or  are
>> actually going. Is classpath still going to "src/main/resources/
>> toserve", or is that old info? Looking at the default.html template,
>> there's no jquery.js or CSS files in a "toserve" directory; in fact
>> there is no "toserve" directory period, so I made my own. Also I see
>> "", and I have no idea where that's going. I don't
>> see any CSS class with blueprint method, but the syntax looks clean
>> and I'd like to add my own custom stylesheet in the same fashion.
>>
>
> The /classpath stuff is served out of the Lift JAR file rather than out of
> a directory.  If you want to have your own CSS, just put it in
> /src/webapp/css/xxx.css and then refer to /css/xxx.css in your web page.
>
>
>>
>> 2. Dynamically generated HTML - what's the best practice, and how to
>> do it?
>>
>
> Snippets are the way that Lift does dynamic HTML.  It's not a templating
> system, but a binding between your XHTML file and methods on classes that
> substitute the dynamically generated HTML.
>
>
>> I would like to know what the lift equivalent is for the following:
>>
>> Index
>>
>
> In the case of Lift, you don't have to do this.   href="/home/index">index will automatically be rewritten for the correct
> context path. No work on your part.
>
>>
>> That's the way I was taught to link web pages together because it
>> avoids hardcoding the page location, but the main point is the stuff
>> inside <%=...%>. It looks like the lift uses {...}, but this example
>> from the lift book causes an IllegalArgumentException (bad XML
>> according to the msgs I've found on this board):
>> > {LiftRules.resourceServerPath + "/css/style.css" } />
>>
>
> If you're writing Scala, then you can do substitutions like the one above,
> but Lift's views are not like JSP templates.  In the above case, you can
> simply say:
> 
>
> And it will be automatically updated based on the context path.
>
>>
>> How do I go about making this work, and in what scenarios should I be
>> using this {...} approach vs snippets?
>>
>> Note: An earlier example in the lift book used href="/classpath/css/
>> style.css", but later on said that the 1st method is better. The basic
>> lift archetype references /classpath everywhere as well, so I don't
>> know what to believe.
>>
>> I guess those are the glaring questions I have right now. In addition,
>> what are some common search terms I could use to find this sort of
>> basic info on the board, or where can I find best practices info and
>> more examples of working sites? I'd rather see what documentation/
>> tutorials already exists for beginners before I send more messages for
>> the board, but my main issue is knowing whether or not I'm getting the
>> right information; most every lift example document/wiki/tutorial I've
>> seen is outdated code or incomplete. I'm looking for more code
>> examples that comply with lift's current evolution. The lift book is
>> helpful, but I also feel a little left out when I read it because I
>>

[Lift] Re: html not being evalutated

2009-10-21 Thread Jack Widman
Oops. I just noticed I made source.body a String and not a NodeSeq.
Sometimes source.body is text with html tags in it. Like -

Hey dude, what are you doing?
I guess I should make it a NodeSeq. Sorry about that.
Jack

On Wed, Oct 21, 2009 at 9:33 AM, David Pollak  wrote:

>
>
> On Wed, Oct 21, 2009 at 6:32 AM, jack  wrote:
>
>>
>> Let's say source.body is Search.  If I put
>> source.body in a span like this -
>>
>> {source.body}
>>
>> source.body will be converted to text and the actual link tags will be
>> displayed. What is the right way to do this?
>>
>>
> How was source.body generated?
>
>
>> On Oct 21, 9:06 am, David Pollak 
>> wrote:
>> > On Tue, Oct 20, 2009 at 10:16 PM, jack  wrote:
>> >
>> > > OK, I see why this is happening. the {exp} in the NodeSeq convert exp
>> > > to a String. So I did by creating a string and then converting it to a
>> > > NodeSeq at the end. Is there a way to do this without using and
>> > > intermediary string?
>> >
>> > I don't know what a source is, but you really, really have to be careful
>> > about promoting a String to a NodeSeq.  If the String has user-generated
>> > content in it, then you've got a cross-site scripting vulnerability
>> waiting
>> > to happen.  For user-generated content, I suggest using Textile parser
>> built
>> > into Lift.
>> >
>> > In any case, if you don't have a NodeSeq in your data structure, you'll
>> have
>> > to parse it into XML before displaying it.
>> >
>> >
>> >
>> >
>> >
>> > > On Oct 21, 1:03 am, jack  wrote:
>> > > > I have the following method display. source.body has html tags in it
>> > > > but the actual tags are showing instead of being evaluated. e.g. I'm
>> > > > seeing things like 'Hey There' instead of 'Hey There' in
>> bold.
>> > > > This method is in a CometActor and is running when the page is
>> > > > rendered. Am I missing something obvious?
>> >
>> > > >  def display(sources:List[Source]):NodeSeq = {
>> >
>> > > > 
>> > > > {
>> > > >for {source <- sources} yield {source.body}
>> > > > }
>> >
>> > > > 
>> > > > 
>> > > >   }
>> >
>> > --
>> > Lift, the simply functional web frameworkhttp://liftweb.net
>> > Beginning Scalahttp://www.apress.com/book/view/1430219890
>> > Follow me:http://twitter.com/dpp
>> > Surf the harmonics
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
>
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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: html not being evalutated

2009-10-21 Thread jack

Let's say source.body is Search.  If I put
source.body in a span like this -

{source.body}

source.body will be converted to text and the actual link tags will be
displayed. What is the right way to do this?

On Oct 21, 9:06 am, David Pollak 
wrote:
> On Tue, Oct 20, 2009 at 10:16 PM, jack  wrote:
>
> > OK, I see why this is happening. the {exp} in the NodeSeq convert exp
> > to a String. So I did by creating a string and then converting it to a
> > NodeSeq at the end. Is there a way to do this without using and
> > intermediary string?
>
> I don't know what a source is, but you really, really have to be careful
> about promoting a String to a NodeSeq.  If the String has user-generated
> content in it, then you've got a cross-site scripting vulnerability waiting
> to happen.  For user-generated content, I suggest using Textile parser built
> into Lift.
>
> In any case, if you don't have a NodeSeq in your data structure, you'll have
> to parse it into XML before displaying it.
>
>
>
>
>
> > On Oct 21, 1:03 am, jack  wrote:
> > > I have the following method display. source.body has html tags in it
> > > but the actual tags are showing instead of being evaluated. e.g. I'm
> > > seeing things like 'Hey There' instead of 'Hey There' in bold.
> > > This method is in a CometActor and is running when the page is
> > > rendered. Am I missing something obvious?
>
> > >  def display(sources:List[Source]):NodeSeq = {
>
> > >     
> > >     {
> > >        for {source <- sources} yield {source.body}
> > >     }
>
> > >     
> > >     
> > >   }
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Surf the harmonics
--~--~-~--~~~---~--~~
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: html not being evalutated

2009-10-20 Thread jack

OK, I see why this is happening. the {exp} in the NodeSeq convert exp
to a String. So I did by creating a string and then converting it to a
NodeSeq at the end. Is there a way to do this without using and
intermediary string?

On Oct 21, 1:03 am, jack  wrote:
> I have the following method display. source.body has html tags in it
> but the actual tags are showing instead of being evaluated. e.g. I'm
> seeing things like 'Hey There' instead of 'Hey There' in bold.
> This method is in a CometActor and is running when the page is
> rendered. Am I missing something obvious?
>
>  def display(sources:List[Source]):NodeSeq = {
>
>     
>     {
>        for {source <- sources} yield {source.body}
>     }
>
>     
>     
>   }
--~--~-~--~~~---~--~~
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] html not being evalutated

2009-10-20 Thread jack

I have the following method display. source.body has html tags in it
but the actual tags are showing instead of being evaluated. e.g. I'm
seeing things like 'Hey There' instead of 'Hey There' in bold.
This method is in a CometActor and is running when the page is
rendered. Am I missing something obvious?

 def display(sources:List[Source]):NodeSeq = {


{
   for {source <- sources} yield {source.body}
}



  }
--~--~-~--~~~---~--~~
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: does this look ok?

2009-10-18 Thread Jack Widman
yes. I think I found the problem elsewhere in the logic. thanks.

On Sun, Oct 18, 2009 at 11:07 PM, Naftoli Gugenheim wrote:

> I think so... Does it compile?
>
>
> On Sun, Oct 18, 2009 at 7:13 PM, jack  wrote:
>
>>
>> Does this code look ok?
>>
>>
>>  def createDisplay(blogs:List[Blog]):NodeSeq = {
>>
>>
>>{
>>  for {blog <- blogs} yield {blog.url}> a> {blog.title}
>> }
>>    
>>  }
>>
>>  def render  = { bind("joop" -> createDisplay(blogs)) }
>>
>>
>
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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] does this look ok?

2009-10-18 Thread jack

Does this code look ok?


 def createDisplay(blogs:List[Blog]):NodeSeq = {


{
  for {blog <- blogs} yield {blog.url} {blog.title}
}

  }

  def render  = { bind("joop" -> createDisplay(blogs)) }
--~--~-~--~~~---~--~~
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] does this look ok?

2009-10-18 Thread jack

Does this code look ok?

def createDisplay(blogs:List[Blog]):NodeSeq = {
   
{
  for {blog <- blogs} yield {blog.url} {blog.displayScore}
}

  }

  def render  = { bind("joop" -> createDisplay(blogs)) }
--~--~-~--~~~---~--~~
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: The quality of the Lift list [was: Don't shoot the non-XML messenger ...]

2009-10-14 Thread Jack Widman
fyi

http://developers.curl.com/people/rshiplett

On Wed, Oct 14, 2009 at 3:40 PM, Jack Widman  wrote:

> Not to harp on it  but:
>
> *When some sycophants of
> Seaside got, nasty, I did not walk away from Seaside, warts and all.
> *
> suggests this person has had this problem elsewhere.
>
>
>
> On Wed, Oct 14, 2009 at 3:37 PM, Jack Widman wrote:
>
>> The necessity of this kind of action (the banning) is absolutely no sign
>> of anything having been done wrong. There will ALWAYS be people like that.
>>
>>
>> On Wed, Oct 14, 2009 at 3:31 PM, koveen  wrote:
>>
>>>
>>> I think that when someone enters a group, expecting to be shot,
>>> it is a very kind act only to ban him.
>>>
>>> Ko
>>>
>>> On Oct 14, 7:49 pm, David Pollak 
>>> wrote:
>>> > Folks,
>>> >
>>> > It is not lightly that I ban someone from the group... this is only the
>>> > second time I've banned a substantive poster.  I'm going to discuss
>>> some of
>>> > the process and then touch on some of the substance of the questions
>>> that
>>> > the poster was getting at.
>>> >
>>> > The Lift community, reflected on this list, is an inquisitive, friendly
>>> > place where people who have a passion for building great web apps
>>> converge
>>> > and contribute to making Lift a really great open source framework.
>>>  Newbies
>>> > are the lifeblood of the group because they come with fresh
>>> perspectives and
>>> > new ways of looking at things.  Questions from newbies help us refine
>>> and
>>> > enhance Lift and the associated documentation.  Folks who are building
>>> > production apps on Lift receive the fastest turn-around because these
>>> folks
>>> > are betting their careers and their enterprises (even enterprises of
>>> one) on
>>> > Lift and they deserve the best support in the industry for taking this
>>> risk.
>>> >
>>> > A big part of why this community is successful (in terms of size,
>>> quality of
>>> > discussion, and quality of results) is because we keep the quality of
>>> > discussion high.  How do we do this?  The folks who have been on the
>>> list
>>> > generally keep the level of discussion to the Lift ideals.  We reward
>>> > newbies with quick answers and encourage friendly discourse.  We are
>>> > generally slower to respond to those that are less reflective of the
>>> list
>>> > ideals.  I warn folks who are pushing boundaries (usually privately,
>>> but
>>> > every once in a while publicly) and where the line is.
>>> >
>>> > In this case, nothing worked.  The poster was neither asking questions,
>>> > giving usable feedback, or being polite in his engagement with the
>>> folks on
>>> > the list.  I received a substantial number of private communications
>>> about
>>> > this poster (which is pretty rare), and I took action.
>>> >
>>> > In terms of the substance, let me address to "threat" issue first.  I
>>> > threatened to ban the poster from the list.  Perhaps DHH or Martin
>>> would not
>>> > make such a threat.  I am very sure that the quality of discussion on
>>> the
>>> > Lift list is higher than that on the Rails list (one of the reasons I
>>> > started Lift was to be part of a nicer community.)  One cost of having
>>> a
>>> > nicer place is excluding those who do not fit.  The second "threat" I
>>> made
>>> > was to relay a tongue-in-cheek private communication I received about
>>> the
>>> > poster to the list (after receiving the okay from the guy that made the
>>> > communication to me.)  This "threat" was obvious, using video game
>>> rating
>>> > language <http://www.esrb.org/ratings/ratings_guide.jsp>, "Comic
>>> mischief"
>>> > and "Cartoon violence".  It was something that even a 6 year old can
>>> > distinguish from reality.  Put another way, the poster was talking
>>> about
>>> > Kafkaesque experiences with using Lift and I responded with
>>> > Jonesian<
>>> http://www.youtube.com/watch?v=CrupqdGvsoc&feature=PlayList&p=62FED00..
>>> .>language.
>>> >
>>> > In terms of the broader issue of Lift's HTML templati

[Lift] Re: The quality of the Lift list [was: Don't shoot the non-XML messenger ...]

2009-10-14 Thread Jack Widman
Not to harp on it  but:

*When some sycophants of
Seaside got, nasty, I did not walk away from Seaside, warts and all.
*
suggests this person has had this problem elsewhere.


On Wed, Oct 14, 2009 at 3:37 PM, Jack Widman  wrote:

> The necessity of this kind of action (the banning) is absolutely no sign of
> anything having been done wrong. There will ALWAYS be people like that.
>
>
> On Wed, Oct 14, 2009 at 3:31 PM, koveen  wrote:
>
>>
>> I think that when someone enters a group, expecting to be shot,
>> it is a very kind act only to ban him.
>>
>> Ko
>>
>> On Oct 14, 7:49 pm, David Pollak 
>> wrote:
>> > Folks,
>> >
>> > It is not lightly that I ban someone from the group... this is only the
>> > second time I've banned a substantive poster.  I'm going to discuss some
>> of
>> > the process and then touch on some of the substance of the questions
>> that
>> > the poster was getting at.
>> >
>> > The Lift community, reflected on this list, is an inquisitive, friendly
>> > place where people who have a passion for building great web apps
>> converge
>> > and contribute to making Lift a really great open source framework.
>>  Newbies
>> > are the lifeblood of the group because they come with fresh perspectives
>> and
>> > new ways of looking at things.  Questions from newbies help us refine
>> and
>> > enhance Lift and the associated documentation.  Folks who are building
>> > production apps on Lift receive the fastest turn-around because these
>> folks
>> > are betting their careers and their enterprises (even enterprises of
>> one) on
>> > Lift and they deserve the best support in the industry for taking this
>> risk.
>> >
>> > A big part of why this community is successful (in terms of size,
>> quality of
>> > discussion, and quality of results) is because we keep the quality of
>> > discussion high.  How do we do this?  The folks who have been on the
>> list
>> > generally keep the level of discussion to the Lift ideals.  We reward
>> > newbies with quick answers and encourage friendly discourse.  We are
>> > generally slower to respond to those that are less reflective of the
>> list
>> > ideals.  I warn folks who are pushing boundaries (usually privately, but
>> > every once in a while publicly) and where the line is.
>> >
>> > In this case, nothing worked.  The poster was neither asking questions,
>> > giving usable feedback, or being polite in his engagement with the folks
>> on
>> > the list.  I received a substantial number of private communications
>> about
>> > this poster (which is pretty rare), and I took action.
>> >
>> > In terms of the substance, let me address to "threat" issue first.  I
>> > threatened to ban the poster from the list.  Perhaps DHH or Martin would
>> not
>> > make such a threat.  I am very sure that the quality of discussion on
>> the
>> > Lift list is higher than that on the Rails list (one of the reasons I
>> > started Lift was to be part of a nicer community.)  One cost of having a
>> > nicer place is excluding those who do not fit.  The second "threat" I
>> made
>> > was to relay a tongue-in-cheek private communication I received about
>> the
>> > poster to the list (after receiving the okay from the guy that made the
>> > communication to me.)  This "threat" was obvious, using video game
>> rating
>> > language <http://www.esrb.org/ratings/ratings_guide.jsp>, "Comic
>> mischief"
>> > and "Cartoon violence".  It was something that even a 6 year old can
>> > distinguish from reality.  Put another way, the poster was talking about
>> > Kafkaesque experiences with using Lift and I responded with
>> > Jonesian<
>> http://www.youtube.com/watch?v=CrupqdGvsoc&feature=PlayList&p=62FED00..
>> .>language.
>> >
>> > In terms of the broader issue of Lift's HTML templating system being
>> XHTML
>> > only, yes, that's true.  Lift treats HTML templates as XML.  Lift's
>> > templating system is not a String templating system but an XML
>> templating
>> > system.  This satisfies the needs to render content to HTML browsers.
>>  If
>> > there are needs for generating other kinds of content, Lift is not as
>> good,
>> > but in many cases there are better libraries for doing so.  Lift makes
>> it
>> 

[Lift] Re: The quality of the Lift list [was: Don't shoot the non-XML messenger ...]

2009-10-14 Thread Jack Widman
)
> > everything must be well formed XML.  The advantages are (1) security (2)
> > performance (it's easier to cache XML and the cost of mutating XML trees
> is
> > O(log N)), (3) there is better separation of logic from the view (perhaps
> > Terrance Parr's String Template library achieves this level of
> separation),
> > and (4) the ability to mutate the resulting page (rewrite tags, move
> stuff
> > to head/tail, consolidate scripts) is more performant and less
> error-prone
> > than doing the same with a String-based representation.
> >
> > I will address Bill's security question.  For String-based rendering
> systems
> > that emit HTML, the developer is the one who must make a decision at each
> > insertion point as to whether the incoming String needs to be escaped.
> >  Because Strings are untyped, you don't know what they mean, if they're
> > "safe" to be passed directly or if they need to be escaped.  On the other
> > hand, keeping the output structure in XML, you know when you're promoting
> a
> > String to an XML element and by default, it's done securely.  The
> developer
> > has to affirmatively do something that will introduce a vulnerability.
> >  Here's an example:
> >
> > val inputFromBadUser = "alert('boo');"val
> > vulnerableStringTemplating = "The other guy said:
> > "+inputFromBadUser+""
> > val safeXMLTemplating = The other guy said: {inputFromBadUser}
> >
> > Sure, it's possible to use the "Unescaped" class for a String and it's
> > possible to parse the user's input as XML, but both of these cases are
> based
> > on doing something other than the default.  The default if you're using
> XML
> > for XHTML templating is that things are secure.  The default if you're
> using
> > Strings to represent the output is is insecure unless the developer does
> the
> > right thing at each insertion point.
> >
> > I thank you all for your participation in this community.  It's the kind
> of
> > place I like being part of and that's because of the quality of the
> people
> > and the discussions.  I want to make sure as we grow from 1,400+ members
> to
> > 5,000 members that the group retains the quality and energy that it has.
> >
> > David
> >
> > On Tue, Oct 13, 2009 at 7:21 PM, David Pollak <
> feeder.of.the.be...@gmail.com
> >
> >
> >
> > > wrote:
> > > You are banned from this group.
> >
> > > On Tue, Oct 13, 2009 at 6:24 PM, Aule  wrote:
> >
> > >> Bryan
> >
> > >> Been there, tried that.
> > >> Oh - the mime type is "text/vnd.curl"
> >
> > >> Btw, actually a threat has been conveyed to me at mail.google.com and
> > >> I have protested to Google
> >
> > >> I can't imagine Dave Hansen or MArtin Odersky or Bill Venners or Lex
> > >> Spoon sending me a threat, but so it goes ...
> >
> > >> At least I will not get 4 years in an Egyptian prison for insulting
> > >> Randy's Alma Mater (Madison).
> >
> > >> Oh Randy.  I read my Paul Valéry in the original.
> www.hsinfosystems.com
> > >> is missing the accent on his surname.
> >
> > >> Lift is not Scala; I will continue to recommend Scala.
> >
> > >> For me, the jury on Lift is not yet in.  When some sycophants of
> > >> Seaside got, nasty, I did not walk away from Seaside, warts and all.
> >
> > >> R
> >
> > >> On Oct 13, 8:10 pm, Bryan  wrote:
> > >> > Hi Aule,
> >
> > >> > > I am still looking to see if I over-looked somewhere on the web
> where
> > >> > > there is a 1.0.2 Boot.scala
> >
> > >> > >   1) showing unambiguously how to flip the default Content-Type
> > >> > >   2) and having, in fact, the intended effect
> >
> > >> > >  as I now know from a few trials over a few hours that this is not
> as
> > >> > > simple as some web posts present.
> >
> > >> > I have not had a need for this, so I had to search some "web posts"
> to
> > >> > find the answer.  Quckly, I found the following snippet:
> >
> > >> > LiftRules.determineContentType = {
> > >> >   case _ => "text/curl"
> >
> > >> > }
> >
> > >> > I have not verified this, so please let us know if it does not help.
> >
> > >> > > Were it trivial, I had not mocked a framework, and you, Mr.
> Pollock,
> > >> > > had not raged.
> >
> > >> > From my readings, Mr. Pollak has yet to show any rage.
> >
> > >> > --Bryan
> >
> > > --
> > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> >
> > > Follow me:http://twitter.com/dpp
> > > Surf the harmonics
> >
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Surf the harmonics
>
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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: Naming CometActors

2009-10-07 Thread Jack Widman
The naming each CometActor with a different name is working quite nicely.

On Wed, Oct 7, 2009 at 5:51 PM, David Pollak
wrote:

>
>
> On Wed, Oct 7, 2009 at 2:39 PM, Derek Chen-Becker 
> wrote:
>
>> It's been a while since I looked at this, but IIRC, the name for
>> CometActor is there so that you can distinguish multiple actors on the same
>> page. I don't think that you share a CometActor between multiple requests. I
>> think that each request gets a new CometActor that's in place as long as the
>> page is active.
>>
>
> Multiple requests share the same CometActor given type/name.  The
> CometActor lives until the session ends or until it times out based on its
> lifespan.
>
>
>>
>> Derek
>>
>>
>> On Tue, Oct 6, 2009 at 1:28 PM, Jack Widman wrote:
>>
>>>
>>> So if give a  CometActor a static name, say "Other", then every request
>>> will get the same running instance of the CometActor. But if I name it
>>> dynamically, say with a random string, each request will get its own
>>> instance of the CometActor. Right?
>>> --
>>> Jack
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
>
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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: maven and jetty

2009-10-06 Thread Jack Widman
I am picking up a very subtle insinuation that that question was too easy
for this forum. I agree whole heartedly. Won't do it again. My next question
is - Is P=NP?  No wait, thats not appropriate.

On Tue, Oct 6, 2009 at 5:07 PM, Timothy Perrett wrote:

> Correct. :run uses the stuff under src/main/webapp vs :run-war that uses
> what is bundled in the war (surprise surprise!)
>
> This should all be explained in the maven-jetty-plugin docs as this is not
> something lift specific by any means.
>
> Cheers, Tim
>
> Sent from my iPhone
>
> On 6 Oct 2009, at 21:57, Jack Widman  wrote:
>
> I thought run uses classes and run-war uses the war. no?
>
> On Tue, Oct 6, 2009 at 4:54 PM, MarkChance < 
> mark.cha...@gmail.com> wrote:
>
>>
>> I use mvn -Djetty.port=8090 jetty:run
>> It builds the war and then runs jetty.  If you leave it running and re-
>> build the war, say in your IDE, the Jetty generally restarts
>> automatically.
>>
>> HTH, Mark
>>
>> On Oct 5, 8:44 pm, Jack Widman  wrote:
>> > Well it seems that mvn run-war is creating the war and overriding the
>> one I
>> > just uploaded. How do I just run with a given war and not create the
>> war.
>> >
>>
>>
>>
>
>
> --
> Jack
>
>
>
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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: maven and jetty

2009-10-06 Thread Jack Widman
I thought run uses classes and run-war uses the war. no?

On Tue, Oct 6, 2009 at 4:54 PM, MarkChance  wrote:

>
> I use mvn -Djetty.port=8090 jetty:run
> It builds the war and then runs jetty.  If you leave it running and re-
> build the war, say in your IDE, the Jetty generally restarts
> automatically.
>
> HTH, Mark
>
> On Oct 5, 8:44 pm, Jack Widman  wrote:
> > Well it seems that mvn run-war is creating the war and overriding the one
> I
> > just uploaded. How do I just run with a given war and not create the war.
> >
>
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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] Naming CometActors

2009-10-06 Thread Jack Widman
So if give a  CometActor a static name, say "Other", then every request will
get the same running instance of the CometActor. But if I name it
dynamically, say with a random string, each request will get its own
instance of the CometActor. Right?
-- 
Jack

--~--~-~--~~~---~--~~
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: Help!

2009-10-06 Thread Jack Widman
Thanks David. The command I was trying to remember was deploy-war but I kept
using run-war. The names are not quite precise. run-war should be called
build-and-run-war, and deploy-war is really run-with-war. If those names
were not so horribly long, that is.

On Tue, Oct 6, 2009 at 3:05 AM, David Bernard wrote:

>
> To create a war :
> mvn package
>
> To deploy (outline), (war are bundles that need a WebApp server to run
> (eg : jetty, tomcat, glassfish, jboss,...):
> # install jetty on your server (not maven)
> ## start jetty
> ## try http://jetty.host:jetty.port/  (eg: http://127.0.0.1:8080/)
> ## stop
> # put your .war into the jetty/webapp dir
> ## start jetty
> ## try http://jetty.host:jetty.port/mywebapp (mywebapp is the basename
> of your .war, if you don't want context (mywebapp prefix, named your
> war ROOT.war)
> # optional tweak the jetty configuration (read the jetty doc)
>
> FYI : Tim Perret is working on solution to create standalone jar with
> jetty embedded (search in the mailing-list)
>
> If you don't use Comet, you could try the winstone-maven-plugin to
> create a runnable jar
>
> /davidB
>
> On Tue, Oct 6, 2009 at 05:31, jack  wrote:
> >
> > never mind.
> > deploy-war, not run-war
> > (been working too hard)
> >
> > On Oct 5, 11:09 pm, Jack Widman  wrote:
> >> I meant to say jetty:run-war
> >>
> >> On Mon, Oct 5, 2009 at 10:52 PM, jack  wrote:
> >>
> >> > Is mvn jetty:run supposed to creat the war file? I want to upload a
> >> > war file and just run it, not create another one. How do I do that?
> >>
> >> --
> >> Jack
> > >
> >
>
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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: execute code when browser is closed

2009-10-05 Thread Jack Widman
I didn't mean to sound like I am justifying the way I am doing. I definitely
do not have a good feel for lift yet and  it feels hackey to me too. Part of
it is I'm rushing to get a demo done at the same time I am learning lift.
Thanks for your help.

On Tue, Oct 6, 2009 at 2:04 AM, Timothy Perrett wrote:

> Hey jack,
>
> As I said before, I think the design you have is wrong if your needing to
> code in a hacky way such as this. The way you articulate the justification
> for using shutdown almost certianly clarifies an incorrect design.
>
> Personally I think you could use Ajax for this an have a much simpler
> design of system... I would tend to recomend using comet when you have some
> server side state that changes and needs update client side continually.
> Kinda feel it's hammer to crack a nut here, but perhaps that's just me.
>
> Hope you get it sorted :-)
>
> Cheers, Tim
>
> Sent from my iPhone
>
> On 6 Oct 2009, at 05:25, Jack Widman  wrote:
>
> So I am using a snippet like this
>  def go:NodeSeq = {
> var term:String = S.param("term").openOr("")
> 
> 
> 
> 
> 
>   }
>
> And the term is indeed different each time. But I am still getting the same
> results from two different browsers with different terms.
>
> On Tue, Oct 6, 2009 at 12:18 AM, Naftoli Gugenheim <
> naftoli...@gmail.com> wrote:
>
>>
>> You are correct that Comet is a way to update information after the page
>> is loaded. I think there's a simpler way using ajax, but I haven't explored
>> those areas of Lift yet. But meanwhile you need to have the xml specifying
>> the comet actor be dynamic. So you need to have that xml be generated by a
>> snippet. A snippet is an XML to XML function.
>>
>>
>> -
>> jack< jack.wid...@gmail.com> wrote:
>>
>>
>> Let me start again. Maybe I am misunderstanding when Comet should be
>> used. In my application, people search for web pages. I do a lot of
>> processing for each resulting page. First I just display the links and
>> then as the processing is finished, the links on the page are
>> automatically modified with the data I just found for each link. This
>> is all working fine.
>>
>> But, the session is being shared among all users so if I make one
>> search in one browser, and then make another search from another
>> browser, I get the results from the first browser.
>>
>> David suggested I name each CometActor differently. That is not
>> working, though maybe I am not doing it right.
>>
>> On Oct 6, 12:01 am, Naftoli Gugenheim  wrote:
>> > What do you mean?
>> >
>> > -
>> >
>> > jack wrote:
>> >
>> > i guess you meant put the snippet right in the CometActor. Ok. Now I'm
>> > getting it.
>> >
>> > On Oct 5, 11:46 pm, Jack Widman  wrote:
>> >
>> >
>> >
>> > > Sorry if this is a dumb question but in > > > name={searchString}/>, what is searchString? This is in an html file.
>> I am
>> > > obviously missing something.
>> >
>> > > On Mon, Oct 5, 2009 at 2:40 PM, David Pollak
>> > > < feeder.of.the.be...@gmail.com>wrote:
>> >
>> > > > On Mon, Oct 5, 2009 at 10:27 AM, Jack Widman > >wrote:
>> >
>> > > >> Understood. My intention is to send a ShutDown message to the
>> CometActor
>> > > >> when somebody closes the browser. I need this so that when they
>> visit the
>> > > >> page in a browser again, the CometActor is 'reset'.
>> >
>> > > > First, there's no way to determine if the browser window is closed.
>> >
>> > > > Second, *DO NOT* send a ShutDown message to the CometActor.  This is
>> an
>> > > > internal Lift piece of housekeeping.  If you do this, you will break
>> stuff.
>> > > >  Don't do it.  (There is a reason the message is not private, but it
>> should
>> > > > not be used for this purpose.)
>> >
>> > > > CometActors can be named:
>> >
>> > > > 
>> >
>> > > > You can then have a separate CometActor for each searchString.
>>  Voila...
>> > > > you get what you want.  Now, how do you make then CometActor go away
>> when
>> > > > it's not being used anymore?
>> >
>> > > > In your CometActor:
>> &g

[Lift] Re: execute code when browser is closed

2009-10-05 Thread Jack Widman
So I am using a snippet like this
 def go:NodeSeq = {
var term:String = S.param("term").openOr("")





  }

And the term is indeed different each time. But I am still getting the same
results from two different browsers with different terms.

On Tue, Oct 6, 2009 at 12:18 AM, Naftoli Gugenheim wrote:

>
> You are correct that Comet is a way to update information after the page is
> loaded. I think there's a simpler way using ajax, but I haven't explored
> those areas of Lift yet. But meanwhile you need to have the xml specifying
> the comet actor be dynamic. So you need to have that xml be generated by a
> snippet. A snippet is an XML to XML function.
>
>
> -
> jack wrote:
>
>
> Let me start again. Maybe I am misunderstanding when Comet should be
> used. In my application, people search for web pages. I do a lot of
> processing for each resulting page. First I just display the links and
> then as the processing is finished, the links on the page are
> automatically modified with the data I just found for each link. This
> is all working fine.
>
> But, the session is being shared among all users so if I make one
> search in one browser, and then make another search from another
> browser, I get the results from the first browser.
>
> David suggested I name each CometActor differently. That is not
> working, though maybe I am not doing it right.
>
> On Oct 6, 12:01 am, Naftoli Gugenheim  wrote:
> > What do you mean?
> >
> > -
> >
> > jack wrote:
> >
> > i guess you meant put the snippet right in the CometActor. Ok. Now I'm
> > getting it.
> >
> > On Oct 5, 11:46 pm, Jack Widman  wrote:
> >
> >
> >
> > > Sorry if this is a dumb question but in  > > name={searchString}/>, what is searchString? This is in an html file. I
> am
> > > obviously missing something.
> >
> > > On Mon, Oct 5, 2009 at 2:40 PM, David Pollak
> > > wrote:
> >
> > > > On Mon, Oct 5, 2009 at 10:27 AM, Jack Widman  >wrote:
> >
> > > >> Understood. My intention is to send a ShutDown message to the
> CometActor
> > > >> when somebody closes the browser. I need this so that when they
> visit the
> > > >> page in a browser again, the CometActor is 'reset'.
> >
> > > > First, there's no way to determine if the browser window is closed.
> >
> > > > Second, *DO NOT* send a ShutDown message to the CometActor.  This is
> an
> > > > internal Lift piece of housekeeping.  If you do this, you will break
> stuff.
> > > >  Don't do it.  (There is a reason the message is not private, but it
> should
> > > > not be used for this purpose.)
> >
> > > > CometActors can be named:
> >
> > > > 
> >
> > > > You can then have a separate CometActor for each searchString.
>  Voila...
> > > > you get what you want.  Now, how do you make then CometActor go away
> when
> > > > it's not being used anymore?
> >
> > > > In your CometActor:
> > > >  override def lifespan: Box[TimeSpan] = Full(3 minutes)
> >
> > > > That means if a CometActor does not appear on a page for 3 minutes,
> it's
> > > > removed from the session.  If the named CometActor is requested
> again, a new
> > > > one will be created.
> >
> > > >> On Mon, Oct 5, 2009 at 1:18 PM, marius d.  >wrote:
> >
> > > >>> HTTP session termination does not equate with browser-close event.
> >
> > > >>> Br's,
> > > >>> Marius
> >
> > > >>> On Oct 5, 3:22 pm, Jack Widman  wrote:
> > > >>> > Yes, thats what I meant. Thanks
> >
> > > >>> > On Mon, Oct 5, 2009 at 4:10 AM, Timothy Perrett
> > > >>> wrote:
> >
> > > >>> > > But you can do it on session termination (which is what you
> probably
> > > >>> > > want):
> >
> > > >>>
> http://scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scalado...
> >
> > > >>> > > Checkout the method:
> >
> > > >>> > > registerCleanupFunc
> >
> > > >>> > > Cheers, Tim
> >
> > > >>> > > On Oct 5, 8:54 am, Viktor Klang 
> wrote:
> > > >>> > > > On Mon, Oct 5, 2009 at 6:50 AM, jack 
> > &g

[Lift] Re: execute code when browser is closed

2009-10-05 Thread jack

Let me start again. Maybe I am misunderstanding when Comet should be
used. In my application, people search for web pages. I do a lot of
processing for each resulting page. First I just display the links and
then as the processing is finished, the links on the page are
automatically modified with the data I just found for each link. This
is all working fine.

But, the session is being shared among all users so if I make one
search in one browser, and then make another search from another
browser, I get the results from the first browser.

David suggested I name each CometActor differently. That is not
working, though maybe I am not doing it right.

On Oct 6, 12:01 am, Naftoli Gugenheim  wrote:
> What do you mean?
>
> -
>
> jack wrote:
>
> i guess you meant put the snippet right in the CometActor. Ok. Now I'm
> getting it.
>
> On Oct 5, 11:46 pm, Jack Widman  wrote:
>
>
>
> > Sorry if this is a dumb question but in  > name={searchString}/>, what is searchString? This is in an html file. I am
> > obviously missing something.
>
> > On Mon, Oct 5, 2009 at 2:40 PM, David Pollak
> > wrote:
>
> > > On Mon, Oct 5, 2009 at 10:27 AM, Jack Widman wrote:
>
> > >> Understood. My intention is to send a ShutDown message to the CometActor
> > >> when somebody closes the browser. I need this so that when they visit the
> > >> page in a browser again, the CometActor is 'reset'.
>
> > > First, there's no way to determine if the browser window is closed.
>
> > > Second, *DO NOT* send a ShutDown message to the CometActor.  This is an
> > > internal Lift piece of housekeeping.  If you do this, you will break 
> > > stuff.
> > >  Don't do it.  (There is a reason the message is not private, but it 
> > > should
> > > not be used for this purpose.)
>
> > > CometActors can be named:
>
> > > 
>
> > > You can then have a separate CometActor for each searchString.  Voila...
> > > you get what you want.  Now, how do you make then CometActor go away when
> > > it's not being used anymore?
>
> > > In your CometActor:
> > >  override def lifespan: Box[TimeSpan] = Full(3 minutes)
>
> > > That means if a CometActor does not appear on a page for 3 minutes, it's
> > > removed from the session.  If the named CometActor is requested again, a 
> > > new
> > > one will be created.
>
> > >> On Mon, Oct 5, 2009 at 1:18 PM, marius d. wrote:
>
> > >>> HTTP session termination does not equate with browser-close event.
>
> > >>> Br's,
> > >>> Marius
>
> > >>> On Oct 5, 3:22 pm, Jack Widman  wrote:
> > >>> > Yes, thats what I meant. Thanks
>
> > >>> > On Mon, Oct 5, 2009 at 4:10 AM, Timothy Perrett
> > >>> wrote:
>
> > >>> > > But you can do it on session termination (which is what you probably
> > >>> > > want):
>
> > >>>http://scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scalado...
>
> > >>> > > Checkout the method:
>
> > >>> > > registerCleanupFunc
>
> > >>> > > Cheers, Tim
>
> > >>> > > On Oct 5, 8:54 am, Viktor Klang  wrote:
> > >>> > > > On Mon, Oct 5, 2009 at 6:50 AM, jack 
> > >>> wrote:
>
> > >>> > > > > I would like to call a function when the browser is closed. How
> > >>> do I
> > >>> > > > > do this?
>
> > >>> > > > You cannot reliably do this.
>
> > >>> > > > --
> > >>> > > > Viktor Klang
>
> > >>> > > > Blog: klangism.blogspot.com
> > >>> > > > Twttr: viktorklang
>
> > >>> > > > Lift Committer - liftweb.com
> > >>> > > > AKKA Committer - akkasource.org
> > >>> > > > Cassidy - github.com/viktorklang/Cassidy.git
> > >>> > > > SoftPub founder:http://groups.google.com/group/softpub
>
> > >>> > --
> > >>> > Jack
>
> > >> --
> > >> Jack
>
> > > --
> > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > Follow me:http://twitter.com/dpp
> > > Surf the harmonics
>
> > --
> > Jack
--~--~-~--~~~---~--~~
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: execute code when browser is closed

2009-10-05 Thread jack

i guess you meant put the snippet right in the CometActor. Ok. Now I'm
getting it.

On Oct 5, 11:46 pm, Jack Widman  wrote:
> Sorry if this is a dumb question but in  name={searchString}/>, what is searchString? This is in an html file. I am
> obviously missing something.
>
> On Mon, Oct 5, 2009 at 2:40 PM, David Pollak
> wrote:
>
>
>
>
>
>
>
> > On Mon, Oct 5, 2009 at 10:27 AM, Jack Widman wrote:
>
> >> Understood. My intention is to send a ShutDown message to the CometActor
> >> when somebody closes the browser. I need this so that when they visit the
> >> page in a browser again, the CometActor is 'reset'.
>
> > First, there's no way to determine if the browser window is closed.
>
> > Second, *DO NOT* send a ShutDown message to the CometActor.  This is an
> > internal Lift piece of housekeeping.  If you do this, you will break stuff.
> >  Don't do it.  (There is a reason the message is not private, but it should
> > not be used for this purpose.)
>
> > CometActors can be named:
>
> > 
>
> > You can then have a separate CometActor for each searchString.  Voila...
> > you get what you want.  Now, how do you make then CometActor go away when
> > it's not being used anymore?
>
> > In your CometActor:
> >  override def lifespan: Box[TimeSpan] = Full(3 minutes)
>
> > That means if a CometActor does not appear on a page for 3 minutes, it's
> > removed from the session.  If the named CometActor is requested again, a new
> > one will be created.
>
> >> On Mon, Oct 5, 2009 at 1:18 PM, marius d. wrote:
>
> >>> HTTP session termination does not equate with browser-close event.
>
> >>> Br's,
> >>> Marius
>
> >>> On Oct 5, 3:22 pm, Jack Widman  wrote:
> >>> > Yes, thats what I meant. Thanks
>
> >>> > On Mon, Oct 5, 2009 at 4:10 AM, Timothy Perrett
> >>> wrote:
>
> >>> > > But you can do it on session termination (which is what you probably
> >>> > > want):
>
> >>>http://scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scalado...
>
> >>> > > Checkout the method:
>
> >>> > > registerCleanupFunc
>
> >>> > > Cheers, Tim
>
> >>> > > On Oct 5, 8:54 am, Viktor Klang  wrote:
> >>> > > > On Mon, Oct 5, 2009 at 6:50 AM, jack 
> >>> wrote:
>
> >>> > > > > I would like to call a function when the browser is closed. How
> >>> do I
> >>> > > > > do this?
>
> >>> > > > You cannot reliably do this.
>
> >>> > > > --
> >>> > > > Viktor Klang
>
> >>> > > > Blog: klangism.blogspot.com
> >>> > > > Twttr: viktorklang
>
> >>> > > > Lift Committer - liftweb.com
> >>> > > > AKKA Committer - akkasource.org
> >>> > > > Cassidy - github.com/viktorklang/Cassidy.git
> >>> > > > SoftPub founder:http://groups.google.com/group/softpub
>
> >>> > --
> >>> > Jack
>
> >> --
> >> Jack
>
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Surf the harmonics
>
> --
> Jack
--~--~-~--~~~---~--~~
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: execute code when browser is closed

2009-10-05 Thread Jack Widman
Sorry if this is a dumb question but in , what is searchString? This is in an html file. I am
obviously missing something.

On Mon, Oct 5, 2009 at 2:40 PM, David Pollak
wrote:

>
>
> On Mon, Oct 5, 2009 at 10:27 AM, Jack Widman wrote:
>
>> Understood. My intention is to send a ShutDown message to the CometActor
>> when somebody closes the browser. I need this so that when they visit the
>> page in a browser again, the CometActor is 'reset'.
>>
>>
> First, there's no way to determine if the browser window is closed.
>
> Second, *DO NOT* send a ShutDown message to the CometActor.  This is an
> internal Lift piece of housekeeping.  If you do this, you will break stuff.
>  Don't do it.  (There is a reason the message is not private, but it should
> not be used for this purpose.)
>
> CometActors can be named:
>
> 
>
> You can then have a separate CometActor for each searchString.  Voila...
> you get what you want.  Now, how do you make then CometActor go away when
> it's not being used anymore?
>
> In your CometActor:
>  override def lifespan: Box[TimeSpan] = Full(3 minutes)
>
> That means if a CometActor does not appear on a page for 3 minutes, it's
> removed from the session.  If the named CometActor is requested again, a new
> one will be created.
>
>
>
>>
>> On Mon, Oct 5, 2009 at 1:18 PM, marius d. wrote:
>>
>>>
>>> HTTP session termination does not equate with browser-close event.
>>>
>>> Br's,
>>> Marius
>>>
>>> On Oct 5, 3:22 pm, Jack Widman  wrote:
>>> > Yes, thats what I meant. Thanks
>>> >
>>> > On Mon, Oct 5, 2009 at 4:10 AM, Timothy Perrett
>>> wrote:
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > > But you can do it on session termination (which is what you probably
>>> > > want):
>>> >
>>> > >
>>> http://scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scalado...
>>> >
>>> > > Checkout the method:
>>> >
>>> > > registerCleanupFunc
>>> >
>>> > > Cheers, Tim
>>> >
>>> > > On Oct 5, 8:54 am, Viktor Klang  wrote:
>>> > > > On Mon, Oct 5, 2009 at 6:50 AM, jack 
>>> wrote:
>>> >
>>> > > > > I would like to call a function when the browser is closed. How
>>> do I
>>> > > > > do this?
>>> >
>>> > > > You cannot reliably do this.
>>> >
>>> > > > --
>>> > > > Viktor Klang
>>> >
>>> > > > Blog: klangism.blogspot.com
>>> > > > Twttr: viktorklang
>>> >
>>> > > > Lift Committer - liftweb.com
>>> > > > AKKA Committer - akkasource.org
>>> > > > Cassidy - github.com/viktorklang/Cassidy.git
>>> > > > SoftPub founder:http://groups.google.com/group/softpub
>>> >
>>> > --
>>> > Jack
>>>
>>>
>>
>>
>> --
>> Jack
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
>
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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: Help!

2009-10-05 Thread jack

never mind.
deploy-war, not run-war
(been working too hard)

On Oct 5, 11:09 pm, Jack Widman  wrote:
> I meant to say jetty:run-war
>
> On Mon, Oct 5, 2009 at 10:52 PM, jack  wrote:
>
> > Is mvn jetty:run supposed to creat the war file? I want to upload a
> > war file and just run it, not create another one. How do I do that?
>
> --
> Jack
--~--~-~--~~~---~--~~
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: Help!

2009-10-05 Thread Jack Widman
I meant to say jetty:run-war

On Mon, Oct 5, 2009 at 10:52 PM, jack  wrote:

>
> Is mvn jetty:run supposed to creat the war file? I want to upload a
> war file and just run it, not create another one. How do I do that?
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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] Help!

2009-10-05 Thread jack

Is mvn jetty:run supposed to creat the war file? I want to upload a
war file and just run it, not create another one. How do I do that?
--~--~-~--~~~---~--~~
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: maven and jetty

2009-10-05 Thread Jack Widman
Well it seems that mvn run-war is creating the war and overriding the one I
just uploaded. How do I just run with a given war and not create the war.

On Mon, Oct 5, 2009 at 10:37 PM, Ryan Stradling wrote:

>
> Have you verified another server is not running on that port?
>
> Have you tried http:///   Just to see if that works
>
> Sent from my iPhone
>
> On Oct 5, 2009, at 10:12 PM, jack  wrote:
>
> >
> > I have been working locally for a long time and I seem to have
> > forgotten how to deploy and run a war on Jetty!
> >
> > I am ftping the war to my server and putting it in the target
> > directory.
> >
> > I then run mvn jetty:run-war -Djetty.port=80 and I keep getting the
> > default app.
> >
> > What am I doing wrong?
> > >
>
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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] maven and jetty

2009-10-05 Thread jack

I have been working locally for a long time and I seem to have
forgotten how to deploy and run a war on Jetty!

I am ftping the war to my server and putting it in the target
directory.

I then run mvn jetty:run-war -Djetty.port=80 and I keep getting the
default app.

What am I doing wrong?
--~--~-~--~~~---~--~~
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: How to share request scope data among snippets in Lift

2009-10-05 Thread Jack Widman
I'm not sure English is Turing Complete. Also not sure how prominent it will
be in 50 years ... :)

On Mon, Oct 5, 2009 at 5:51 PM, David Pollak
wrote:

>
>
> On Mon, Oct 5, 2009 at 9:35 AM, Timothy Perrett 
> wrote:
>
>>
>> Call me old fashioned, but good ol' English seems to be quite
>> prevalent these days ;-)
>>
>
> Is this the Queen's English? ;-)
>
>
>>
>> On 5 Oct 2009, at 17:02, Jack Widman wrote:
>>
>> > Why don't we make Esperanto the official Lift language?
>>
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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: How to share request scope data among snippets in Lift

2009-10-05 Thread Jack Widman
Well it is high enough level! [?]

On Mon, Oct 5, 2009 at 3:49 PM, Viktor Klang  wrote:

>
>
> On Mon, Oct 5, 2009 at 6:02 PM, Jack Widman  wrote:
>
>> Why don't we make Esperanto the official Lift language?
>>
>>
> I'd say make Scala the official language ;)
>
>
>>
>> On Mon, Oct 5, 2009 at 11:52 AM, marius d. wrote:
>>
>>>
>>>
>>>
>>> On Oct 5, 6:15 pm, David Pollak  wrote:
>>> > On Sun, Oct 4, 2009 at 2:41 AM, ishiijp 
>>> wrote:
>>> >
>>> > > Thank you for your example, David.
>>> > > It will work in my purpose.
>>> >
>>> > Cool.
>>> >
>>> >
>>> >
>>> > > It seems that my poor English and less information let some people
>>> > > confused.
>>> >
>>> > I appreciate that you have put in the work to translate your thoughts
>>> to
>>> > English.  I apologize that I only speak English, but would love to
>>> speak
>>> > Japanese, German, Russian, and a few other languages.
>>>
>>> oh you gotta learn Romanian :)
>>>
>>> >
>>> > > I need just a request scope data.
>>> > > It means I want to share information between snippets across a
>>> > > request.
>>> > > (Is the expression "request scope" not good for in this case...?)
>>> >
>>> > "request scope" is exactly the right phrase.
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > > Thank all responsed my post,
>>> > > and your suggestions are informative.
>>> > > I think very nice community is here.
>>> >
>>> > > On 9月26日, 午後10:33, David Pollak 
>>> wrote:
>>> > > > To share information between snippets during a request, use a
>>> RequestVar:
>>> > > > object MyInfo extends RequestVar(calculate_value)
>>> >
>>> > > > so
>>> >
>>> > > > object MyInfo extends RequestVar[Box[Invoice]](Empty)
>>> >
>>> > > > in one snippet, you may calculate the Invoice and put it in the
>>> MyInfo:
>>> >
>>> > > > MyInfo.set(Full(invoice))
>>> >
>>> > > > In another snippet, you can extract:
>>> >
>>> > > > for {
>>> > > >   invoice <- MyInfo.is
>>> > > >   } yield ...
>>> >
>>> > > > Note that the "calculate_value" is a call-by-name parameter, so it
>>> will
>>> > > be
>>> > > > invoked each time the RequestVar is uninitialized.  You can place
>>> lazy
>>> > > > calculation logic in here.
>>> >
>>> > > > On Sat, Sep 26, 2009 at 12:14 AM, ishiijp <
>>> yoshinori.is...@gmail.com>
>>> > > wrote:
>>> >
>>> > > > > Hi.
>>> >
>>> > > > > If my lift application have some data that cost to create, and I
>>> want
>>> > > > > to share it among snippets, how to do in Lift?
>>> >
>>> > > > > if such data are shared inside one snippet, I may use "lazy val".
>>> > > > > But I have no nice idea to share it among different snippts.
>>> >
>>> > > > > Thanks much.
>>> >
>>> > > > --
>>> > > > Lift, the simply functional web frameworkhttp://liftweb.net
>>> > > > Beginning Scalahttp://www.apress.com/book/view/1430219890
>>> > > > Follow me:http://twitter.com/dpp
>>> > > > Surf the harmonics
>>> >
>>> > --
>>> > Lift, the simply functional web frameworkhttp://liftweb.net
>>> > Beginning Scalahttp://www.apress.com/book/view/1430219890
>>> > Follow me:http://twitter.com/dpp
>>> > Surf the harmonics
>>>
>>>
>>
>>
>> --
>> Jack
>>
>>
>>
>>
>
>
> --
> Viktor Klang
>
> Blog: klangism.blogspot.com
> Twttr: viktorklang
>
> Lift Committer - liftweb.com
> AKKA Committer - akkasource.org
> Cassidy - github.com/viktorklang/Cassidy.git
> SoftPub founder: http://groups.google.com/group/softpub
>
>
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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: execute code when browser is closed

2009-10-05 Thread Jack Widman
Good. Only thing is that if their job was to start an actor to go out and
search some pages, say, then 'stop your job' means '   'call your 'exit'
method, no?Not trying to be a wise guy. I actually have a number of VCs
lined up to look at my app. Overall I am very glad to be using Lift. On the
Comet alone it save me a LOT of time.
Of course, I  have a lot to learn.

On Mon, Oct 5, 2009 at 3:08 PM, David Pollak
wrote:

>
>
> On Mon, Oct 5, 2009 at 12:06 PM, Jack Widman wrote:
>
>> Because when the users searches on a new keyword, the actors that were
>> processing the results for the last keyword are still processing (some of
>> them). But I can just send each of those a message to stop processing,  no?
>> No problem with that, right?
>
>
> Sure... send them a message that says "tell all your jobs to stop."  This
> has nothing to do with the CometActor lifecycle.  It is all your application
> level stuff.
>
>
>>
>>
>> On Mon, Oct 5, 2009 at 3:02 PM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Mon, Oct 5, 2009 at 11:53 AM, Jack Widman wrote:
>>>
>>>> In my app, when the user is done searching on one keyword, they click a
>>>> link which takes them back to the main search page. Thats the time when I
>>>> wanted the CometActor to stop. Otherwise there will be too many threads
>>>> floating around and performance will suffer.
>>>
>>>
>>> Why?  Actors do not consume threads, they consume memory unless they are
>>> actively processing a message.
>>>
>>>
>>>>
>>>>
>>>> On Mon, Oct 5, 2009 at 2:50 PM, David Pollak <
>>>> feeder.of.the.be...@gmail.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Mon, Oct 5, 2009 at 11:45 AM, Jack Widman wrote:
>>>>>
>>>>>> Interesting. I will try that. And I won't send any more
>>>>>> ShutDownMessages :)
>>>>>> Though I should add that each CometActor is doing a lot of processing.
>>>>>> So I it would be good if I could shut one down somehow when the user
>>>>>> searches on a new term. Timeout won't work because there is no way to 
>>>>>> know
>>>>>> how long it will take.
>>>>>>
>>>>>> Maybe I could just kill all the actors directly that are doing the
>>>>>> processing.
>>>>>>
>>>>>
>>>>> That's going to be even worse.  You'll kill something out from under
>>>>> Lift... it's going to cause a huge pile of pain.
>>>>>
>>>>> You can remove an Actor from the session and that will cause ShutDown
>>>>> to be sent to it, but depending on how the Actor was written it's not 
>>>>> going
>>>>> to stop processing its mailbox.
>>>>>
>>>>> Bottom line... there's no way to tell if a user is not looking at a
>>>>> page with an Actor anymore.  The best way to deal with that is timing the
>>>>> Actor out.  It's going to take time (your timeout period), but it's the 
>>>>> best
>>>>> way to do it.
>>>>>
>>>>>
>>>>>>
>>>>>> On Mon, Oct 5, 2009 at 2:40 PM, David Pollak <
>>>>>> feeder.of.the.be...@gmail.com> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Oct 5, 2009 at 10:27 AM, Jack Widman 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Understood. My intention is to send a ShutDown message to the
>>>>>>>> CometActor when somebody closes the browser. I need this so that when 
>>>>>>>> they
>>>>>>>> visit the page in a browser again, the CometActor is 'reset'.
>>>>>>>>
>>>>>>>>
>>>>>>> First, there's no way to determine if the browser window is closed.
>>>>>>>
>>>>>>> Second, *DO NOT* send a ShutDown message to the CometActor.  This is
>>>>>>> an internal Lift piece of housekeeping.  If you do this, you will break
>>>>>>> stuff.  Don't do it.  (There is a reason the message is not private, 
>>>>>>> but it
>>>>>>> should not be used for 

[Lift] Re: execute code when browser is closed

2009-10-05 Thread Jack Widman
Because when the users searches on a new keyword, the actors that were
processing the results for the last keyword are still processing (some of
them). But I can just send each of those a message to stop processing,  no?
No problem with that, right?

On Mon, Oct 5, 2009 at 3:02 PM, David Pollak
wrote:

>
>
> On Mon, Oct 5, 2009 at 11:53 AM, Jack Widman wrote:
>
>> In my app, when the user is done searching on one keyword, they click a
>> link which takes them back to the main search page. Thats the time when I
>> wanted the CometActor to stop. Otherwise there will be too many threads
>> floating around and performance will suffer.
>
>
> Why?  Actors do not consume threads, they consume memory unless they are
> actively processing a message.
>
>
>>
>>
>> On Mon, Oct 5, 2009 at 2:50 PM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Mon, Oct 5, 2009 at 11:45 AM, Jack Widman wrote:
>>>
>>>> Interesting. I will try that. And I won't send any more ShutDownMessages
>>>> :)
>>>> Though I should add that each CometActor is doing a lot of processing.
>>>> So I it would be good if I could shut one down somehow when the user
>>>> searches on a new term. Timeout won't work because there is no way to know
>>>> how long it will take.
>>>>
>>>> Maybe I could just kill all the actors directly that are doing the
>>>> processing.
>>>>
>>>
>>> That's going to be even worse.  You'll kill something out from under
>>> Lift... it's going to cause a huge pile of pain.
>>>
>>> You can remove an Actor from the session and that will cause ShutDown to
>>> be sent to it, but depending on how the Actor was written it's not going to
>>> stop processing its mailbox.
>>>
>>> Bottom line... there's no way to tell if a user is not looking at a page
>>> with an Actor anymore.  The best way to deal with that is timing the Actor
>>> out.  It's going to take time (your timeout period), but it's the best way
>>> to do it.
>>>
>>>
>>>>
>>>> On Mon, Oct 5, 2009 at 2:40 PM, David Pollak <
>>>> feeder.of.the.be...@gmail.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Mon, Oct 5, 2009 at 10:27 AM, Jack Widman wrote:
>>>>>
>>>>>> Understood. My intention is to send a ShutDown message to the
>>>>>> CometActor when somebody closes the browser. I need this so that when 
>>>>>> they
>>>>>> visit the page in a browser again, the CometActor is 'reset'.
>>>>>>
>>>>>>
>>>>> First, there's no way to determine if the browser window is closed.
>>>>>
>>>>> Second, *DO NOT* send a ShutDown message to the CometActor.  This is an
>>>>> internal Lift piece of housekeeping.  If you do this, you will break 
>>>>> stuff.
>>>>>  Don't do it.  (There is a reason the message is not private, but it 
>>>>> should
>>>>> not be used for this purpose.)
>>>>>
>>>>> CometActors can be named:
>>>>>
>>>>> 
>>>>>
>>>>> You can then have a separate CometActor for each searchString.
>>>>>  Voila... you get what you want.  Now, how do you make then CometActor go
>>>>> away when it's not being used anymore?
>>>>>
>>>>> In your CometActor:
>>>>>  override def lifespan: Box[TimeSpan] = Full(3 minutes)
>>>>>
>>>>> That means if a CometActor does not appear on a page for 3 minutes,
>>>>> it's removed from the session.  If the named CometActor is requested 
>>>>> again,
>>>>> a new one will be created.
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> On Mon, Oct 5, 2009 at 1:18 PM, marius d. wrote:
>>>>>>
>>>>>>>
>>>>>>> HTTP session termination does not equate with browser-close event.
>>>>>>>
>>>>>>> Br's,
>>>>>>> Marius
>>>>>>>
>>>>>>> On Oct 5, 3:22 pm, Jack Widman  wrote:
>>>>>>> > Yes, thats what I meant. Thanks
>>>>>>> >
>>>>>>> > On Mon, Oct 5, 2009 at 

[Lift] Re: execute code when browser is closed

2009-10-05 Thread Jack Widman
In my app, when the user is done searching on one keyword, they click a link
which takes them back to the main search page. Thats the time when I wanted
the CometActor to stop. Otherwise there will be too many threads floating
around and performance will suffer.

On Mon, Oct 5, 2009 at 2:50 PM, David Pollak
wrote:

>
>
> On Mon, Oct 5, 2009 at 11:45 AM, Jack Widman wrote:
>
>> Interesting. I will try that. And I won't send any more ShutDownMessages
>> :)
>> Though I should add that each CometActor is doing a lot of processing. So
>> I it would be good if I could shut one down somehow when the user searches
>> on a new term. Timeout won't work because there is no way to know how long
>> it will take.
>>
>> Maybe I could just kill all the actors directly that are doing the
>> processing.
>>
>
> That's going to be even worse.  You'll kill something out from under
> Lift... it's going to cause a huge pile of pain.
>
> You can remove an Actor from the session and that will cause ShutDown to be
> sent to it, but depending on how the Actor was written it's not going to
> stop processing its mailbox.
>
> Bottom line... there's no way to tell if a user is not looking at a page
> with an Actor anymore.  The best way to deal with that is timing the Actor
> out.  It's going to take time (your timeout period), but it's the best way
> to do it.
>
>
>>
>> On Mon, Oct 5, 2009 at 2:40 PM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>>
>>>
>>> On Mon, Oct 5, 2009 at 10:27 AM, Jack Widman wrote:
>>>
>>>> Understood. My intention is to send a ShutDown message to the CometActor
>>>> when somebody closes the browser. I need this so that when they visit the
>>>> page in a browser again, the CometActor is 'reset'.
>>>>
>>>>
>>> First, there's no way to determine if the browser window is closed.
>>>
>>> Second, *DO NOT* send a ShutDown message to the CometActor.  This is an
>>> internal Lift piece of housekeeping.  If you do this, you will break stuff.
>>>  Don't do it.  (There is a reason the message is not private, but it should
>>> not be used for this purpose.)
>>>
>>> CometActors can be named:
>>>
>>> 
>>>
>>> You can then have a separate CometActor for each searchString.  Voila...
>>> you get what you want.  Now, how do you make then CometActor go away when
>>> it's not being used anymore?
>>>
>>> In your CometActor:
>>>  override def lifespan: Box[TimeSpan] = Full(3 minutes)
>>>
>>> That means if a CometActor does not appear on a page for 3 minutes, it's
>>> removed from the session.  If the named CometActor is requested again, a new
>>> one will be created.
>>>
>>>
>>>
>>>>
>>>> On Mon, Oct 5, 2009 at 1:18 PM, marius d. wrote:
>>>>
>>>>>
>>>>> HTTP session termination does not equate with browser-close event.
>>>>>
>>>>> Br's,
>>>>> Marius
>>>>>
>>>>> On Oct 5, 3:22 pm, Jack Widman  wrote:
>>>>> > Yes, thats what I meant. Thanks
>>>>> >
>>>>> > On Mon, Oct 5, 2009 at 4:10 AM, Timothy Perrett
>>>>> wrote:
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > > But you can do it on session termination (which is what you
>>>>> probably
>>>>> > > want):
>>>>> >
>>>>> > >
>>>>> http://scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scalado.
>>>>> ..
>>>>> >
>>>>> > > Checkout the method:
>>>>> >
>>>>> > > registerCleanupFunc
>>>>> >
>>>>> > > Cheers, Tim
>>>>> >
>>>>> > > On Oct 5, 8:54 am, Viktor Klang  wrote:
>>>>> > > > On Mon, Oct 5, 2009 at 6:50 AM, jack 
>>>>> wrote:
>>>>> >
>>>>> > > > > I would like to call a function when the browser is closed. How
>>>>> do I
>>>>> > > > > do this?
>>>>> >
>>>>> > > > You cannot reliably do this.
>>>>> >
>>>>> > > > --
>>>>> > > > Viktor Klang
>>>>> >
>>>>> > > > Blog: klangism.blogspot.com
>>>>> > > > Twttr: viktorklang
>>>>> >
>>>>> > > > Lift Committer - liftweb.com
>>>>> > > > AKKA Committer - akkasource.org
>>>>> > > > Cassidy - github.com/viktorklang/Cassidy.git
>>>>> > > > SoftPub founder:http://groups.google.com/group/softpub
>>>>> >
>>>>> > --
>>>>> > Jack
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Jack
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Lift, the simply functional web framework http://liftweb.net
>>> Beginning Scala http://www.apress.com/book/view/1430219890
>>> Follow me: http://twitter.com/dpp
>>> Surf the harmonics
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Jack
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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: execute code when browser is closed

2009-10-05 Thread Jack Widman
Interesting. I will try that. And I won't send any more ShutDownMessages :)
Though I should add that each CometActor is doing a lot of processing. So I
it would be good if I could shut one down somehow when the user searches on
a new term. Timeout won't work because there is no way to know how long it
will take.

Maybe I could just kill all the actors directly that are doing the
processing.

On Mon, Oct 5, 2009 at 2:40 PM, David Pollak
wrote:

>
>
> On Mon, Oct 5, 2009 at 10:27 AM, Jack Widman wrote:
>
>> Understood. My intention is to send a ShutDown message to the CometActor
>> when somebody closes the browser. I need this so that when they visit the
>> page in a browser again, the CometActor is 'reset'.
>>
>>
> First, there's no way to determine if the browser window is closed.
>
> Second, *DO NOT* send a ShutDown message to the CometActor.  This is an
> internal Lift piece of housekeeping.  If you do this, you will break stuff.
>  Don't do it.  (There is a reason the message is not private, but it should
> not be used for this purpose.)
>
> CometActors can be named:
>
> 
>
> You can then have a separate CometActor for each searchString.  Voila...
> you get what you want.  Now, how do you make then CometActor go away when
> it's not being used anymore?
>
> In your CometActor:
>  override def lifespan: Box[TimeSpan] = Full(3 minutes)
>
> That means if a CometActor does not appear on a page for 3 minutes, it's
> removed from the session.  If the named CometActor is requested again, a new
> one will be created.
>
>
>
>>
>> On Mon, Oct 5, 2009 at 1:18 PM, marius d. wrote:
>>
>>>
>>> HTTP session termination does not equate with browser-close event.
>>>
>>> Br's,
>>> Marius
>>>
>>> On Oct 5, 3:22 pm, Jack Widman  wrote:
>>> > Yes, thats what I meant. Thanks
>>> >
>>> > On Mon, Oct 5, 2009 at 4:10 AM, Timothy Perrett
>>> wrote:
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > > But you can do it on session termination (which is what you probably
>>> > > want):
>>> >
>>> > >
>>> http://scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scalado...
>>> >
>>> > > Checkout the method:
>>> >
>>> > > registerCleanupFunc
>>> >
>>> > > Cheers, Tim
>>> >
>>> > > On Oct 5, 8:54 am, Viktor Klang  wrote:
>>> > > > On Mon, Oct 5, 2009 at 6:50 AM, jack 
>>> wrote:
>>> >
>>> > > > > I would like to call a function when the browser is closed. How
>>> do I
>>> > > > > do this?
>>> >
>>> > > > You cannot reliably do this.
>>> >
>>> > > > --
>>> > > > Viktor Klang
>>> >
>>> > > > Blog: klangism.blogspot.com
>>> > > > Twttr: viktorklang
>>> >
>>> > > > Lift Committer - liftweb.com
>>> > > > AKKA Committer - akkasource.org
>>> > > > Cassidy - github.com/viktorklang/Cassidy.git
>>> > > > SoftPub founder:http://groups.google.com/group/softpub
>>> >
>>> > --
>>> > Jack
>>>
>>>
>>
>>
>> --
>> Jack
>>
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
>
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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: execute code when browser is closed

2009-10-05 Thread Jack Widman
Understood. My intention is to send a ShutDown message to the CometActor
when somebody closes the browser. I need this so that when they visit the
page in a browser again, the CometActor is 'reset'.

On Mon, Oct 5, 2009 at 1:18 PM, marius d.  wrote:

>
> HTTP session termination does not equate with browser-close event.
>
> Br's,
> Marius
>
> On Oct 5, 3:22 pm, Jack Widman  wrote:
> > Yes, thats what I meant. Thanks
> >
> > On Mon, Oct 5, 2009 at 4:10 AM, Timothy Perrett  >wrote:
> >
> >
> >
> >
> >
> > > But you can do it on session termination (which is what you probably
> > > want):
> >
> > >http://scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scalado.
> ..
> >
> > > Checkout the method:
> >
> > > registerCleanupFunc
> >
> > > Cheers, Tim
> >
> > > On Oct 5, 8:54 am, Viktor Klang  wrote:
> > > > On Mon, Oct 5, 2009 at 6:50 AM, jack  wrote:
> >
> > > > > I would like to call a function when the browser is closed. How do
> I
> > > > > do this?
> >
> > > > You cannot reliably do this.
> >
> > > > --
> > > > Viktor Klang
> >
> > > > Blog: klangism.blogspot.com
> > > > Twttr: viktorklang
> >
> > > > Lift Committer - liftweb.com
> > > > AKKA Committer - akkasource.org
> > > > Cassidy - github.com/viktorklang/Cassidy.git
> > > > SoftPub founder:http://groups.google.com/group/softpub
> >
> > --
> > Jack
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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: How to share request scope data among snippets in Lift

2009-10-05 Thread Jack Widman
Why don't we make Esperanto the official Lift language?

On Mon, Oct 5, 2009 at 11:52 AM, marius d.  wrote:

>
>
>
> On Oct 5, 6:15 pm, David Pollak  wrote:
> > On Sun, Oct 4, 2009 at 2:41 AM, ishiijp 
> wrote:
> >
> > > Thank you for your example, David.
> > > It will work in my purpose.
> >
> > Cool.
> >
> >
> >
> > > It seems that my poor English and less information let some people
> > > confused.
> >
> > I appreciate that you have put in the work to translate your thoughts to
> > English.  I apologize that I only speak English, but would love to speak
> > Japanese, German, Russian, and a few other languages.
>
> oh you gotta learn Romanian :)
>
> >
> > > I need just a request scope data.
> > > It means I want to share information between snippets across a
> > > request.
> > > (Is the expression "request scope" not good for in this case...?)
> >
> > "request scope" is exactly the right phrase.
> >
> >
> >
> >
> >
> > > Thank all responsed my post,
> > > and your suggestions are informative.
> > > I think very nice community is here.
> >
> > > On 9月26日, 午後10:33, David Pollak  wrote:
> > > > To share information between snippets during a request, use a
> RequestVar:
> > > > object MyInfo extends RequestVar(calculate_value)
> >
> > > > so
> >
> > > > object MyInfo extends RequestVar[Box[Invoice]](Empty)
> >
> > > > in one snippet, you may calculate the Invoice and put it in the
> MyInfo:
> >
> > > > MyInfo.set(Full(invoice))
> >
> > > > In another snippet, you can extract:
> >
> > > > for {
> > > >   invoice <- MyInfo.is
> > > >   } yield ...
> >
> > > > Note that the "calculate_value" is a call-by-name parameter, so it
> will
> > > be
> > > > invoked each time the RequestVar is uninitialized.  You can place
> lazy
> > > > calculation logic in here.
> >
> > > > On Sat, Sep 26, 2009 at 12:14 AM, ishiijp  >
> > > wrote:
> >
> > > > > Hi.
> >
> > > > > If my lift application have some data that cost to create, and I
> want
> > > > > to share it among snippets, how to do in Lift?
> >
> > > > > if such data are shared inside one snippet, I may use "lazy val".
> > > > > But I have no nice idea to share it among different snippts.
> >
> > > > > Thanks much.
> >
> > > > --
> > > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > > > Follow me:http://twitter.com/dpp
> > > > Surf the harmonics
> >
> > --
> > Lift, the simply functional web frameworkhttp://liftweb.net
> > Beginning Scalahttp://www.apress.com/book/view/1430219890
> > Follow me:http://twitter.com/dpp
> > Surf the harmonics
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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: ShutDown and CometActor

2009-10-05 Thread Jack Widman
Actually, this is working nicely now. Thanks.

On Mon, Oct 5, 2009 at 11:46 AM, David Pollak  wrote:

> When you send the shutdown message, oddly enough, the CometActor shuts
> down.
> You don't have to do this (in fact, don't do it).  Lift will shut the
> CometActor down automatically.
>
>
> On Sun, Oct 4, 2009 at 7:32 PM, jack  wrote:
>
>>
>> I am sending a ShutDown message to my CometActor to end the session.
>> WHen I then go back to  the CometActor, it is not working properly the
>> way it did the first time. Is there anything I have to do after
>> shutting down the session, or should it just work when I load the
>> CometActor again?
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Surf the harmonics
>
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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: execute code when browser is closed

2009-10-05 Thread Jack Widman
Yes, thats what I meant. Thanks

On Mon, Oct 5, 2009 at 4:10 AM, Timothy Perrett wrote:

>
> But you can do it on session termination (which is what you probably
> want):
>
>
> http://scala-tools.org/mvnsites-snapshots/liftweb/lift-webkit/scaladocs/net/liftweb/http/SessionVar.html
>
> Checkout the method:
>
> registerCleanupFunc
>
> Cheers, Tim
>
> On Oct 5, 8:54 am, Viktor Klang  wrote:
> > On Mon, Oct 5, 2009 at 6:50 AM, jack  wrote:
> >
> > > I would like to call a function when the browser is closed. How do I
> > > do this?
> >
> > You cannot reliably do this.
> >
> >
> >
> > --
> > Viktor Klang
> >
> > Blog: klangism.blogspot.com
> > Twttr: viktorklang
> >
> > Lift Committer - liftweb.com
> > AKKA Committer - akkasource.org
> > Cassidy - github.com/viktorklang/Cassidy.git
> > SoftPub founder:http://groups.google.com/group/softpub
> >
>


-- 
Jack

--~--~-~--~~~---~--~~
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] execute code when browser is closed

2009-10-04 Thread jack

I would like to call a function when the browser is closed. How do I
do this?
--~--~-~--~~~---~--~~
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: CometActor timeout problem

2009-10-04 Thread jack

Excellent. Thanks.

On Oct 5, 12:14 am, Atsuhiko Yamanaka 
wrote:
> Hi,
>
> On Mon, Oct 5, 2009 at 8:16 AM, jack  wrote:
> > With the code exactly as you wrote it, how would you modify it to do
> > this?
>
> > Whenver the Comet Page gets loaded, it resets itself.
>
> How about wrapping your CometActor page with the snippet?
>
> Please refer to attached diff file.
>
> Sincerely,
> --
> Atsuhiko Yamanaka
> JCraft,Inc.
> 1-14-20 HONCHO AOBA-KU,
> SENDAI, MIYAGI 980-0014 Japan.
> Tel +81-22-723-2150
>     +1-415-578-3454
> Skype callto://jcraft/
>
>  diff.txt
> 1KViewDownload
--~--~-~--~~~---~--~~
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] ShutDown and CometActor

2009-10-04 Thread jack

I am sending a ShutDown message to my CometActor to end the session.
WHen I then go back to  the CometActor, it is not working properly the
way it did the first time. Is there anything I have to do after
shutting down the session, or should it just work when I load the
CometActor again?
--~--~-~--~~~---~--~~
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: CometActor timeout problem

2009-10-04 Thread jack

Atsuhiko,

With the code exactly as you wrote it, how would you modify it to do
this?

Whenver the Comet Page gets loaded, it resets itself.

On Oct 3, 12:47 am, Atsuhiko Yamanaka 
wrote:
> Hi,
>
> On Sat, Oct 3, 2009 at 1:05 PM, jack  wrote:
>
> > Atsuhiko,
>
> > The way I have modified the code, each thread is returning its Package
> > object at different times. But its seems the screen updates only when
> > they all have completed. Could you tell me what piece of the code
> > makes the screen update?
>
> Can you show your code?
--~--~-~--~~~---~--~~
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: a very simple question

2009-10-04 Thread Jack Widman
Well my app is a search application. You search for certain web pages and I
do some processing after the results are displayed. Thats why I am using
Comet. Certain information is added to each result link.
I want the user to be able to either hit the back button or click on alink
that goes to the search page again. When they enter a search term and click
submit, I want to load the CometActor class again.

Do you think sending a ShutDown message will accomplish this?
After the session is killed, how do I get the CometActor to automatically
load again. Do I send the message and then redirect to the page?

I am just not comfortable yet with the mechanics of how Lift handles comet.
Thanks in advance.

Jack


On Sun, Oct 4, 2009 at 6:50 PM, Timothy Perrett wrote:

>
> If memory serves, the comet actor lives on in the session scope until
> its either sent the ShutDown message explicitly, or it times out (you
> can set the timeout).
>
> Does that help?
>
> Cheers, Tim
>
> On 4 Oct 2009, at 23:17, jack wrote:
>
> >
> > I put the line
> >
> > println("dude")
> >
> > in a Comet class write under the class declaration.
> >
> > i.e.
> >
> > class JoopComet extends CometActor with CometListenee {
> >
> > println("INSIDE COMET CLASS")
> >
> >
> > When the class runs and all the activity is complete, I hit the back
> > button and that loads the JoopComet class again.
> >
> > But I do not see "dude" printed.
> >
> > Why not?
> > >
> >
>
>
> >
>


-- 
Jack

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



  1   2   >