It appears that rte/getText takes a (required) argument (from the doc):
> Returns the html string displayed in this editor. getText() gets the
> value from the editor and can contain information that is not yet reflected
> in the text attribute.
> @param LzDelegate delegate: An LzDelegate which will be called with
> the editor contents.
Not sure what the intent is there. I think you need to ask the designer.
On 2010-12-02, at 10:57, Lou Iorio wrote:
> 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?