[Laszlo-user] inline method calls in handler not always working

P T Withington ptw at openlaszlo.org
Mon Jul 9 05:23:04 PDT 2007


Yes, method is just a method name on the class.  In the second case,  
an anonymous method is created, so you would have no way of  
overriding the behavior of the handler in a subclass.  In the first  
case, since you have an explicitly named method, subclasses can  
override the behavior.

See http://www.openlaszlo.org/lps/docs/guide/methods-events- 
attributes.html#d0e14504

On 2007-07-09, at 07:33 EDT, Robin Sheat wrote:

> I don't know if this is a bug or not, if someone tells me it is,  
> I'll file it.
>
> This doesn't work:
> <handler name="myevent" method="classroot.myMethod(this);" />
> where this does:
> <handler name="myevent">
> 	classroot.myMethod(this);
> </handler>
>
> is it the case that the 'method' parameter isn't a JS expression,  
> but simply
> the name of a method, or is this not expected behaviour?
>
> -- 
> Robin <robin at kallisti.net.nz> JabberID:  
> <eythian at jabber.kallisti.net.nz>
>
> Hostes alienigeni me abduxerunt. Qui annus est?
>
> PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8  7175 14D3 6485 A99C  
> EB6D



More information about the Laszlo-user mailing list