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

Flash Builder 4.7 conditional compiling failed

Guest
Oct 04, 2012 Oct 04, 2012

Copy link to clipboard

Copied

I installed Flash Builder 4.7 on my windows xp machine, and tried to migrate projects from FB 4.6. However in one of my projects I use conditional compiling, but I'm getting errors.For example in FB 4.6 I have this sample code:

public class MyClass{

     CONFIG::DEBUGGING{

          import com.package.SomeClassOnlyForDebugging

     }

     function someFunction():void{

          if (CONFIG::DEBUGGING){

               SomeClassOnlyForDebugging.create();

          }

      }

}

When I compiled it in FB 4.6 everything worked fine. However when I try to compile it in FB 4.7, then I get error on the conditional compiling only inside the function and not on the import statement. The only way I have found to overpass it is to go to Project>Properties>ActionScript Compiler and disable Enable strict type checking. But this is not a permanent solution.

Am I doing something wrong, or is there some other way to do it?

Views

1.1K

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
Community Beginner ,
Oct 04, 2012 Oct 04, 2012

Copy link to clipboard

Copied

You should to do like that:

function someFunction():void

{

CONFIG::DEBUGGING {

     SomeClassOnlyForDebugging.create();

}

}

without if.

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
Guest
Oct 05, 2012 Oct 05, 2012

Copy link to clipboard

Copied

Yes this solves the problem, but I'm loosing my ability to use if,else conditionals. Should I report it as a bug, or the whole scheme of if,else has been dropped?

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 ,
Oct 25, 2012 Oct 25, 2012

Copy link to clipboard

Copied

LATEST

I would like an answer to this question as well. Having good conditional compilation support is a handy tool to write optimized code.

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