Hi Steven, Thanks for the explanation. If you mean Moock's Essential Actionscript, I've had a read of that section and AFAICS it doesn't mention a bug.
The only real issue I know of in try/catch do with return is that you shouldn't put a return in a finally clause, because finally gets executed when processing completes and exits any try/catch block but before (potentially) the function returns. It leads to a return path that you might not expect. I completely agree that you should try to avoid using try/catch instead of an 'if' statement - however the ReferenceError solution I posted above is several magnitudes faster than generating then parsing then searching through the XML result from describeType, and I felt it worth the sacrifice. Sometimes you've got to throw elegance to the wind and adopt practicality. However, in the end Object.hasOwnProperty() was the solution, I was being stupid, and the ReferenceError solution isn't needed; so it's academic. :-) Ian On Thu, Oct 30, 2008 at 2:21 AM, Steven Sacks <[EMAIL PROTECTED]> wrote: > There's a bug if you return in a try or catch (maybe it's just catch). > Colin Moock mentions it in his AS3 book. I personally think it's cleaner > to return after a try catch because try catch is not an if else and really > shouldn't be treated as such, but that might be because I have avoided > returning inside them since I first started using them because of the bug. > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

