December 11, 2010 - No Comments!

TypeError: Error #1006: value is not a function

A small issue that came up in my debugger today, where the following error was triggered by a Rich Text Editor.

TypeError: Error #1006: value is not a function.
at mx.controls::RichTextEditor/setComboSelection()
at mx.controls::RichTextEditor/getTextStyles()
at mx.controls::RichTextEditor/systemManager_mouseUpHandler()

The error is due to the way the font size drop down is set. We are able to set the values of the drop down via the following method.

richTextEditorInstance.fontSizeArray = [10, 20, 30];

However this format will create the error as the component is expecting a string based array, so to fix our issue we would declare our array as...

richTextEditorInstance.fontSizeArray = ["10", "20", "30"];

Published by: nick in AS3, Flex

Leave a Reply