[Laszlo-user] Extending a base component

Dave Miller dwmiller at umich.edu
Thu Jun 26 17:40:12 PDT 2008


When I needed to add some functionality to a grid row, instead of  
editing basegridrow.lzx, I extended the class like so:

<class name="mygridrow" extends="basegridrow" >
	<handler name="ondblclick" >
		Debug.write("2xclick");
	</handler>
</class>

<grid _rowclass="mygridrow" datapath=...



This worked fine in 4.0.7. When I recently upgraded to 4.0.12 this  
broke. I got the compilation error:

base/basegridrow.lzx:4:55: undefined superclass basecomponent for  
class basegridrow


I understand how my locally declared class might not see the new super  
class 'basecomponent', but was this an intentional change? Or a bug?

Test script below.

Thanks,

Dave


Works in 4.0.7. Errors in 4.0.12

<canvas>
	<class name="mygridrow" extends="basegridrow"/>
	<dataset name="weatherdata" request="true" src="http://www.laszlosystems.com/cgi-pub/weather.cgi?zip=10022 
"/>
     <grid datapath="weatherdata:/weather" contentdatapath="forecast/ 
day" _rowclass="mygridrow"/>
</canvas>


More information about the Laszlo-user mailing list