Is there is an AS3 API, a Flex class or a way than what I have listed below to test if an object is empty?
This does not work on a Flex application:
var o:Object = {};
var result:Boolean = isEmpty(o); // true
var result2:Boolean = isEmpty(FlexGlobals.topLevelApplication); // true
function isEmpty(object) {
for(var i in object) { return false; }
return true;
}
UPDATE: I'm asking if there's a method in the Flash or Flex AS3 API since it doesn't work on the Application class. There are classes like ObjectUtil that I'm looking for because there are things like prototype chains and objects like the application class that don't show properties when doing a simple properties loop. Please remove the close flag so people can answer.