Re: Joel on Anonymous methods



Another good example about the powerfull of anonymous methods could be the
JQuery library (jquery.com). There you can do something like this:

$.('.Class').click(function() { alert($(this).html()) })

In this one line example, I'm attaching an onclick event handler to all of
the elements in a html page of the class 'class' which will show its html
content in an alert message.

Francisco Ruiz


.



Relevant Pages

  • Re: Joel on Anonymous methods
    ... I'm attaching an onclick event handler to ... show its html content in an alert message. ... You can do exactly the same with a named procedure, ... Anonymous methods could still be used effectively to call that function with differing parameters instead of having to implement separate event methods that all call that same function with only different parameters. ...
    (borland.public.delphi.non-technical)
  • Re: Design methodology question
    ... much more powerfull then simple html. ... The success of HTML was not a fluke. ... The marked up language is a simple ... user interface is based on a marked up language. ...
    (comp.lang.php)