Re: Arc challenge
"Hannes Wallnoefer" <[email protected]> Mon, 4 Feb 2008 11:42:18 +0100
| Newsgroups | gmane.comp.java.helma.general |
|---|---|
| Message-ID | <[email protected]> |
2008/2/3, Joshua Paine <[email protected]>: > Paul Graham has a little challenge to show off the terseness of his new > Lisp dialect. > > Here's the original: <http://arclanguage.org/item?id=722> > And here's my go with Helma: <http://arclanguage.org/item?id=1099> Very interesting. I took the occasion to have a look at the Arc tutorial. As you'd expect, the Arc web framework (if you can already call it a framework) is quite callback-centric, similar to Seaside. Since Gobi's Markup.jus actually supports callbacks I tried to come up with an implementation that actually works along the lines of the arc example. I had to extend and fix Markup.js, but here's the (working) result: function said_action() { Html.form({ callback: function() { var foo = req.data.foo; Html.link({ callback: function() { res.write("you said: " + foo); } }, "click here")}}, Html.Input({name: "foo"}), Html.Submit() ); } hannes > I did learn the difference between res.message and session.message in > doing it. > _______________________________________________ > Helma-user mailing list > [email protected] > http://helma.org/mailman/listinfo/helma-user >