Make sure object property exists, java.
Make sure object has a property.
This works for both Java and Actionscript. Used it before. But couldn't remember what it was called.
So Making a blog entry that is titled with the search terms I first thought of when looking for it in google.
That I way I can find it again.
//ANSWER:
someObject.hasOwnProperty("propertyNameAsString");
hasOwnProperty will return TRUE if the property exists, false if not.
Works for all objects in ActionScript and Java.
No comments:
Post a Comment