Flex: Constant strings in metadata
- by Daniel Engmann
I have something like
public class Controller {
[Observer("fetchEmployeesEvent")]
public function fetchEmployees() : void {
//doSomething
}
}
and I want something like
public class Controller {
public static const FETCH_EMPLOYEES_EVENT : String = "fetchEmployeesEvent";
[Observer(FETCH_EMPLOYEES_EVENT)]
public function fetchEmployees() : void {
//doSomething
}
}
My problem is that only the first code snippet works. Flex seems to ignore the constant FETCH_EMPLOYEES_EVENT in the metadata-tag.
My question is: Is it somehow possible to use constant strings in metadata?