• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Is there a compile type check for .as files?

New Here ,
May 16, 2010 May 16, 2010

Copy link to clipboard

Copied

It seems there is no compile support for the .as files. I made a typo, typing HttpService, instead of HTTPService, in one of my .as files, but suprisingly, Flash Builder does not flag it at all. I have enabled "Build automatically", so I assumed that if there are any errors, Flash Builder should flag it. I also have tried to clean the project and force build the project manually, but still it does not show any compile error problems.  See screenshot below:

FlashBuilderAsNoCompileTypeCheck.jpg

On the other hand, if I made the error in .mxml file, Flash Builder correctly flag it as error.

Please see the screenshot below:

FlashBuilderMxmlCompileTypeCheck.jpg

I want to have compile type check when working on .as files too. Is there any way I can enable that?

Thanks.

Views

503

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , May 17, 2010 May 17, 2010

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

Votes

Translate

Translate
New Here ,
May 16, 2010 May 16, 2010

Copy link to clipboard

Copied

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?

Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 17, 2010 May 17, 2010

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 17, 2010 May 17, 2010

Copy link to clipboard

Copied

LATEST

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?

Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines