In actionscript, how to convert a function variable into a string -
in actionscript3, have function variable assigned 1 of 100 functions.
during execution, want able print out name of function assigned to. unfortunately if trace (f) f function variable, merely reports parameter types , return value type of function, doesn't mention name, if function static. know trick string representation of function variable? bad adobe didn't think of issue, helpful thing when debugging.
short answer: can't. references functions not have names in actionscript.
long answer: it's possible if know class defined function , function public. can iterate on methods of class until find 1 matches reference have, , know name. see stackoverflow answer
Comments
Post a Comment