Hi Lou,

The <html> class was modified a while back and the attributes have changed. Once Henry's fix is applied, you also need to change the app to:

<canvas >
   <include href="extensions/html.lzx"/>
   <class name="browser" extends="window" resizable="true" bgcolor="silver">
      <edittext name="txt" text="http://openlaszlo.org/"; width="300"/>
<button x="310" onclick="parent.htmlview.setSrc(parent.txt.getText()); parent.htmlview.setAttribute('visible', true)">
      Load
      </button>
      <html name="htmlview"
            widthoffset="-19"
            heightoffset="74"
            xoffset="7"
            yoffset="53"/>
   </class>
   <browser width="500" height="500" x="10" y="10"/>
</canvas>


However, this example is still a bit wonky. The "real" version to use is http://localhost:8080/trunk/lps/components/extensions/test/html.lzx?lzr=dhtml. It still has issues in swf.


In Chapter 9 Introduction to Text and Fonts, Example 9.6. The <html> tag:

<canvas >
   <include href="extensions/html.lzx"/>
   <class name="browser" extends="window" resizable="true" bgcolor="silver">
<edittext name="txt" text="<http://openlaszlo.org>http://openlaszlo.org/"; width="300"/> <button x="310" onclick="parent.htmlview.setSrc(parent.txt.getText()); parent.htmlview.setAttribute('visible', true)">
      Load
      </button>
      <html name="htmlview"
            width="${parent.width - 19}"
            height="${parent.height - 74}"
            x="${parent.x + 7}"
            y="${parent.y + 53}"/>
   </class>
   <browser width="500" height="500" x="10" y="10"/>
</canvas>

The compiler complains:

extensions/html.lzx:46:56: In element 'class' attribute 'xoffset' with type 'number' is overriding parent class attribute with same name but different type: numberExpression extensions/html.lzx:47:56: In element 'class' attribute 'yoffset' with type 'number' is overriding parent class attribute with same name but different type: numberExpression extensions/html.lzx:76:94: In element 'class' attribute 'visible' with type 'boolean' is overriding parent class attribute with same name but different type: expression text-tutorial-$6.lzx:13:35: found an unknown attribute named "width" on element html, however there is an attribute named "widthoffset" on class attribute", did you mean to use that? text-tutorial-$6.lzx:13:35: found an unknown attribute named "height" on element html, however there is an attribute named "heightoffset" on class attribute", did you mean to use that? text-tutorial-$6.lzx:13:35: found an unknown attribute named "x" on element html, however there is an attribute named "xoffset" on class attribute", did you mean to use that? text-tutorial-$6.lzx:13:35: found an unknown attribute named "y" on element html, however there is an attribute named "yoffset" on class attribute", did you mean to use that?

Any ideas?

Thanks,

Lou

Reply via email to