> The solution I used works much the same way as Ian's: essentially it takes > advantage of the fact that Flash's compiler isn't able to check the object
> type of sub-items of an object or array, so it ignores them (and assumes
> you've done your job correctly).

Danny,

It seems to me if you're willing to use a "hack" like this, you might as well take the :Object off your tObj parameter and call it a day. :)

If you look at it objectively, you're adding extra lines of code for no reason. AS2 has absolutely no gains from strict typing. The compiled code looks exactly the same whether you use typing or not. Also, you're tricking the compiler here anyway, so any benefit from typing the parameter is lost. Why not do it by deleting 7 characters instead of adding a couple of lines of code?

If you were using AS3, you could use :* but you're not so the equivalent in AS2 is to leave off the type.

My 2 cents.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to