
Adobe AIR Introspector
IntrospectorAliases.js
When developing user interfaces in Adobe AIR and HTML/JavaScript you don’t have the luxury of using the browser tools you may be accustomed to using. What Adobe provides instead is the Introspector tool; which is similar to but not as feature rich as most browser tools. Hey, you have to look at the bright side, at least Adobe gives you the basics to work with.
This file was born as a bunch of functions I used to place at the bottom of the AIRIntrospector.js file. However, its not proper to change the files provided by a third party so I broke them off into this file. It usually saves me a bunch of typing while debugging my Adobe AIR user interfaces using the Introspector. Maybe it can save you a bit of typing too.
IntrospectorAliases.js
/** * log * Alias for air.Introspector.Console.log * @param {String} str */ function log(str){ air.Introspector.Console.log(str); } /** * warn * Alias for air.Introspector.Console.warn * @param {String} str */ function warn(str){ air.Introspector.Console.warn(str); } /** * info * Alias for air.Introspector.Console.info * @param {String} str */ function info(str){ air.Introspector.Console.info(str); } /** * error * Alias for air.Introspector.Console.error * @param {String} str */ function error(str){ air.Introspector.Console.error(str); } /** * dump * Alias for air.Introspector.Console.dump * @param {Object} obj */ function dump(obj){ air.Introspector.Console.dump(obj); } // Almost forgot this part below /************************************************* ************************************************* * IntrospectorAliases.js Supplimentary * Include this at the top of page script * in order to leave console call functions * in source while not using the Introspector * * Simply comment out the AIRIntrospector.js * include to turn off the Introspector while * testing. Doing this will avoid errors. *\ function log(str){air.trace(str);} function warn(str){air.trace(str);} function info(str){air.trace(str);} function error(str){air.trace(str);} function dump(obj){air.trace(obj);} /************************************************** ***************************************************/