Re: Re[2]: [Flashcoders] why are my class property's strong typing being ignored?
ok well maybe i spoke too soon: If you try it by the following way, you'll surely get a compile error: settings.settings_id = settingsBranch.firstChild..firstChild.nodeValue; // nope, no error settings.settings_id = settingsBranch.firstChild.firstChild.nodeValue; On 11/16/06, Rich Rodecker <[EMAIL PROTECTED]> wrote: Of course not, because you use the array syntax again (childNodes[0] there you go! I was overlooking the array syntax in the assignment. Thanks! On 11/16/06, Rákos Attila <[EMAIL PROTECTED]> wrote: > > > When saying the compiler has no type information I mean that it > doesn't know, that the members of the childNodes array are XMLNode > objects (because the lack of typed arrays), so it doesn't know > anything about the type of the array members' properties, too. > > Attila > > ___ > Flashcoders@chattyfig.figleaf.com > 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 > ___ Flashcoders@chattyfig.figleaf.com 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
Re: Re[2]: [Flashcoders] why are my class property's strong typing being ignored?
Of course not, because you use the array syntax again (childNodes[0] there you go! I was overlooking the array syntax in the assignment. Thanks! On 11/16/06, Rákos Attila <[EMAIL PROTECTED]> wrote: When saying the compiler has no type information I mean that it doesn't know, that the members of the childNodes array are XMLNode objects (because the lack of typed arrays), so it doesn't know anything about the type of the array members' properties, too. Attila ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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
Re[2]: [Flashcoders] why are my class property's strong typing being ignored?
When saying the compiler has no type information I mean that it doesn't know, that the members of the childNodes array are XMLNode objects (because the lack of typed arrays), so it doesn't know anything about the type of the array members' properties, too. Attila ___ Flashcoders@chattyfig.figleaf.com 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
Re[2]: [Flashcoders] why are my class property's strong typing being ignored?
RR> // this does not produce an error RR> settings.settings_id = settingsBranch.childNodes[0].firstChild.nodeValue; Of course not, because you use the array syntax again (childNodes[0], which is in fact the same method as in your previous settings[tagName]) and when using such, the compiler has no type information (since there are no typed arrays in AS). If you try it by the following way, you'll surely get a compile error: settings.settings_id = settingsBranch.firstChild..firstChild.nodeValue; Attila ___ Flashcoders@chattyfig.figleaf.com 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
Re[2]: [Flashcoders] why are my class property's strong typing being ignored?
In AS2 there is a compile-time type-checking only, the Flash VM itself doesn't care about type settings. If the type of an expression cannot be determined during the compilation, then type-checking is simply omitted. In your code it applies to the settings[tagName] reference, where the referred type could be determined run-time only, so the compiler obviously will not check it. Run-time type-checking was introduced in AVM2 (Flash Player 9 & AS3). Attila ___ Flashcoders@chattyfig.figleaf.com 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