[parenscript-devel] js closures in ps?

Kevin Layer layer at known.net
Sat Oct 13 15:44:13 UTC 2007


Greetings.  I'm new to parenscript.  I'm currently playing with
converting a lisp program that generates js "the hard way".  I have
some code that looks like this (excerpted from a format string):

    function addPlace(lat, lon, label, icon) {
      var point = new GLatLng(lat, lon);
      var marker = new GMarker(point, { icon : icon });
      GEvent.addListener(marker,\"click\", function() {
        map.openInfoWindowHtml(point, label);
      });
      map.addOverlay(marker);
    }

I can find nothing in the ps docs that tell me how to deal with the
function() { ... }.  Did I just miss it?

Kevin



More information about the parenscript-devel mailing list