It seems that only when the Actionscript class is referenced from the mxml, then the compile-time check is run on the class. For example, if I try to instantiate the class Foo below from the main mxml, only then the error "type was not found" for HttpService is shown. If the class is in the project, but the class is not referenced or instantiated anywhere from the mxml, then there is no compile-time check on the class. Is that true? If it is true, it is very impractical though because I might just create a Actionscript class without using it anywhere, and I still want compile-time check is run on that class.
Can someone please help me or clarify my understanding?
Your findings are correct. The compiler is limited to showing compiler errors in the context of a compilation unit (application, module, etc.).
Jason San Jose
Software Engineer, Flash Builder
Ok, I can live with this. Coming from Java background, I found this "feature" confusing though. In Java, all classes in the Eclipse project, no matter whether the classes are actually used or not, will be compile-time checked. Hopefully in future release this could be fixed?