s:State or mx:State
I recently tried to migrate an ios application from flex sdk 4.5.1 (with AIR 3.0) to flex SDK 4.6.0 with an overlay of AIR 3.8.
I got a load of errors, mostly related to namespace issues. I have a few custom skins that use State, LinearGradient, GradientEntry, SolidColor and some other classes. They are all scoped to the s: namespace (xmlns:s="library://ns.adobe.com/flex/spark"). This never caused any errors and there's plenty of examples online using s:State.
Plain SDK 4.6.0 doesn't care either, but with AIR 3.8 overlay, suddenly it doesn't compile anymore. I started looking into it and found out that in fact, State is listed in the online documentation as mx.states.State (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/states/State.html). When I start typing 'State' in FlashBuilder 4.6 or 4.7, syntax lookahead proposes mx.states.State. But when I look through the sdk framework sources (plain flex 4.5.1 and 4.6.0 but also 4.6.0 with AIR 3.8 overlay), I see loads of references to s:State and only a handful of mx:State.
I'm assuming it's the same for the other classes. So what is the correct syntax? Should I change all of my code to use the mx namespace for State, LinearGradient, GradientEntry, SolidColor, etc?
Can anyone explain why these 2 namespaces coexist?
Is there a way to tell the compiler how to handle this?
Regards,
Sander Kruger.
