[Laszlo-dev] adding sys info to lzpix - issues with dhtml

Jim Grandy jgrandy at openlaszlo.org
Thu Aug 10 01:20:40 EDT 2006


I thought I'd add code to LZPIX to display the OpenLaszlo version  
(canvas.version) and build number (from app.lzx?lzt=serverinfo). This  
should help QA (and everyone else) verify what build we have deployed  
on labs and elsewhere.

I added this line after the includes in app.lzx:

     <dataset name="sinfo" src="http:app.lzx?lzt=serverinfo"  
request="true" />

And these lines after the "links" view:

     <view name="sysinfo" x="12" y="570">
         <simplelayout spacing="-3" />
         <text resize="true" fontsize="9" text="${'OpenLaszlo  
Version: ' + canvas.version}" />
         <view>
           <text fontsize="9" text="OpenLaszlo Build: "/>
           <text resize="true" fontsize="9" datapath="sinfo:/*/@build"/>
           <simplelayout axis="x"/>
         </view>
     </view> <!-- end sysinfo -->

This works nicely in Flash, but I see two problems in DHTML. The  
first isn't a big deal: canvas.version isn't hooked up yet, so I get  
'undefined' -- I'll file a bug.

Second, I get a Javascript error in Firefox (and Opera) with the  
databound text view. The error is "$2 has no properties" and is in  
the first line of this block of compiled code:

6218 for(var $13=0;$13<$2.childNodes.length;$13++){
6219 if($2.childNodes[$13].nodeType==LzDataNode.ELEMENT_NODE){
6220 $12++
6221 if(!$11||$12>=$11[0]){
6222 $4.push($2.childNodes[$13])
6223 }
6224 if($11&&$12==$11[1]){
6225 break
6226 }
6227 }

Have I just run into a place where our XML processing hasn't caught  
up in DHTML, or is this a bug? If a bug, is it already filed? If not,  
I'll file one.

jim


More information about the Laszlo-dev mailing list