Categories
ActionScript Flex

1144: Interface method set data in namespace is implemented with an incompatible signature in class .

Full error message: 1144: Interface method set data in namespace is implemented with an incompatible signature in class.

<package:class><mypackage:myclass></mypackage:myclass></package:class>

This error appears in Flex Builder / Eclipse on the Problems Tab.This error refers to the fact that an extended class named <package.class> with an over ridable function has a correspondent override in <mypackage:myclass> that doesn’t match the overrided function. To be more specific i’ll give you an example:
Let’s say we want to create a custom data grid header renderer and in order to do this we will create a class VerticalHeaderRenderer that will extend DataGridItemRenderer. In the class VerticalHeaderRenderer we will override the setter function for the data property like this:

override public function set data(value:Object):void{
local_var = value.toString();
}

This is the correct version and it will not give the error mentioned in the title but if we have a function that has a parameter of a different type then Object or a different return type we will receive the error.

Basically this error tells us that we are trying to override a function with different parameters or different return value type. So to escape this error you must ensure that the override is made correctly.

Hope this helps.

Good luck.

3 replies on “1144: Interface method set data in namespace is implemented with an incompatible signature in class .”

It happened to me once when using:

public function funcName()
{
// function body
}

instead of

public function funcName() : void // <== the diference.
{
// function body
}

The clearly say in the help that the signatures must match "exaclty".

Comments are closed.