I’m creating a Flex table in which one column is editable. I want to restrict the user’s input to certain characters. The following code gives an Could not resolve <s:itemEditor> to a component implementation error. Anyone know how to resolve this?
...
<fx:Array>
<supportClasses:MyColumn ... />
<supportClasses:MyColumn editable="true" ...>
<s:itemEditor>
<fx:Component>
<s:TextInput restrict="0-9a-zA-Z"/>
</fx:Component>
</s:itemEditor>
</supportClasses:MyColumn>
<supportClasses:MyColumn ... />
...
</fx:Array>
...
Where MyColumn is a class and function as follows:
import spark.components.gridClasses.GridColumn;
public class MyColumn extends GridColumn
{
...
public function MyColumn(headerText:String="header" width:Number=100 ...)
{
this.headerText=headerText;
...
}
}
I found a solution to your issue on this blog post.
The issue is that the mxml compiler gets confused when the namespaces don’t match (
supportClasses:ands:). The fix is very simple: