I'm trying to include this example from LPP-9307 to the RTE chapter of the
dguide.
The following example works as expected in SWF8, but when I run it in SWF10,
I
get this:
org.openlaszlo.sc.CompilerError: rtecustombuttons.lzx: 8: Error: Incorrect
number of arguments. Expected 1, in line: this.setAttribute("text", "<b>" +
this.getText() + "</b>")
Here's the code:
<canvas>
<!--
Adding custom image button to the rte component. This demonstrates how you
can use an image button instead of text.
-->
<include href="extensions/rte.lzx"/>
<rte width="600" height="400">Initial contents of the component.
<method name="rte_bold" args="ignore"> <![CDATA[
// Turn all the text bold
this.setAttribute ('text', '<b>' + this.getText() + '</b>');
]]>
</method>
<handler name="oneditorready">
this.addButton ({type: 'image',
src:'/trunk/examples/extensions/logo_small.png', width:'44', height:'44',
alt:'All Bold', title:'All Bold'}, new LzDelegate(this, 'rte_bold'));
</handler>
</rte>
</canvas>
Any help?