Very well then. If you do recall the rationale for keeping Any for non
Ajax function, please let me/us know about it or add a comment in the
code as I get the feeling that this will raise up again in the future.

Br's,
Marius

On Jan 22, 8:36 pm, Naftoli Gugenheim <naftoli...@gmail.com> wrote:
> I'm curious to know the difference between returning Any or Unit, if you 
> remember. Is it possible it was a bug in Scala?
>
> -------------------------------------
>
> David Pollak<feeder.of.the.be...@gmail.com> wrote:
> On Fri, Jan 22, 2010 at 2:22 AM, Marius <marius.dan...@gmail.com> wrote:
> > This same thing is also touched byhttp://reviewboard.liftweb.net/r/184/
> > (driven by Kris' post)
>
> > Do you agree with these following statements:
>
> > 1. The SHtml Ajax function should return JsCmd
>
> Yes.
>
> > 2. The SHtml non Ajax function should return a Unit instead of Any
> > (unless there are compelling reasons to keep Any)
>
> There is a compelling reason to keep Any.  I can't remember it right now,
> but there is a really, really good reason (I've made the change to Unit in
> the past and it broke a pile of stuff in my applications.)
>
>
>
>
>
> > If so I could probably make the adjustments today since I'm on that
> > defect anyways.
>
> > Br's,
> > Marius
>
> > On Jan 22, 5:48 am, David Pollak <feeder.of.the.be...@gmail.com>
> > wrote:
> > > On Mon, Jan 18, 2010 at 10:31 AM, Felipe Rodrigues <
>
> > > felipero.maill...@gmail.com> wrote:
> > > > That's a little better.. thanks
>
> > > Originally, the function returned Any... and this led to problems (people
> > > returning HTML, Strings, etc.)  It turns out that 95% of the time, you
> > want
> > > to do something to tell the user that the server did something (unless
> > the
> > > function sends a message to a CometActor), so using the type-system to
> > make
> > > sure Ajax functions returned JsCmds was the right answer.
>
> > > > greekscala wrote:
>
> > > >> Hello,
>
> > > >> know what you mean. You can use JsCmds._Noop to return "nohting" as
> > > >> JsCmd.
>
> > > >> best regards
>
> > > >> On 18 Jan., 17:25, Felipe Rodrigues <felipero.maill...@gmail.com>
> > > >> wrote:
>
> > > >>> Here is how I made it, but seems ugly:
>
> > > >>> SHtml.a(() => {serverSideFunction(t.text); Call("void", Num(0)).cmd},
> > t)
>
> > > >>> It is awkward having to add a JsCmd even when I don't need it.
>
> > > >>> Felipe
>
> > > >>> Naftoli Gugenheim wrote:
>
> > > >>>> Never mind my question; I hadn't paid attention to the subject.
> > > >>>>      -------------------------------------
> > > >>>> Felipe Rodrigues<felipero.maill...@gmail.com> wrote:
> > > >>>>      Hi all,
> > > >>>>      I want to create a link which when clicked calls a server side
> > > >>>> function.
> > > >>>> No need for JavaScript callback.
> > > >>>> I tried with no success:
> > > >>>>      SHtml.a(() => {serverSideFunction(t.text)}, t)
> > > >>>>      Any idea how can I accomplish that will be appreciated.
> > > >>>>      Thanks,
> > > >>>>      Felipe
>
> > > > --
> > > > 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<liftweb%2bunsubscr...@googlegroups.com>
> > <liftweb%2bunsubscr...@googlegroups.com<liftweb%252bunsubscr...@googlegroups.com>
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/liftweb?hl=en.
>
> > > --
> > > 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<liftweb%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/liftweb?hl=en.
>
> --
> 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 
> athttp://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.

Reply via email to