8 Replies Latest reply on Dec 4, 2013 3:48 PM by Haibarbe Software

    found 2 bugs in new Flash Builder 4.7

    infeter Level 1



      I've just migrated all of my large projects to the new Flash Builder 4.7 (from 4.6) and they all work well except for the 2 annoying issues:

      1. I don't know why, but FB no longer allows me to create "config" packages. It says "config is a reserved word in ActionScript and cannot be used." Wtf? I had lots of projects using such names in FB 4.6 and didn't have any issues with it. Is it a new rule in FB 4.7? If so - then why it was introduced and was introduced only now? ActionScript language and FB exist not the first year... Also after i migrated existent projects i see all "config" packages have non-standard "folder" icon in the source file tree (in the package explorer panel).

      2. There are strange warnings started to appear - "the import BLA-BLA-BLA is not used locally", but I am not blind - I see it is used just a little bit below in the code. What is wrong with this?


      Please help as I am confused now about what to do... I waited for FB 4.7 for so long and now I think I will need to downgrade...

        • 1. Re: found 2 bugs in new Flash Builder 4.7
          infeter Level 1

          As I didn't receive any feedback yet - created 2 bugs at Adobe Bugbase:

          https://bugs.adobe.com/jira/browse/FB-35851 - FB 4.7 no longer allows to create packages with reserved words in ActionScript

          https://bugs.adobe.com/jira/browse/FB-35850 - FB 4.7 reports that imports are not used locally, but they are not

          • 2. Re: found 2 bugs in new Flash Builder 4.7
            Gaius Coffey Level 2

            Hi Infeter,

            For 1;

            After the number of hours I have lost debugging issues where someone has inadvertently named a variable the same as a package that is on the root, so making it impossible for FB to discern whether I am talking about "aname.veryImportant" as the sub-package "veryImportant" of the package "aname" or the property "veryImportant" of the variable "aname", I welcome any and all new warnings of how a coder may inadvertently break Flash! So, if they are saying it is a reserved word, it is probably because there is a core class, variable or other such that will, at some point, bite you if you name something after it. This has always been the case with, for example "default" - default is a keyword that has real meaning for the compiler and you will not be allowed to define things as "default" because of the potential for confusion (are you issuing the "default" directive in a switch statement or are you referring to the "default" value in your class?). Given that FB has the frankly excellent "Refactor" function to allow you to easily rename packages, members and classes, I'd just be happy to rename the offending items and be glad to have saved myself several hours of painful debug later on.


            For 2;

            I'm surprised you're seeing this warning for classes that are not used. I've found loads that were added in automatically over the years that simply are not used. I'm loving the way I can clean out about half my import statements now. The thing to do is to comment out the imports and check that everything still works. If it does, then you're laughing, you don't need them. If it triggers errors of not being able to locate the class, then I would put together a code snippet and add it as a comment to your bug report.



            • 3. Re: found 2 bugs in new Flash Builder 4.7
              infeter Level 1

              hello Gaius Coffey. thanks for the reply. i reviewed your feedback and also reviewed my projects in the past time. and i agree with your suggestions and i've already found the "non used imports" warnings helpful too. the only disadvantage i experienced was that i had to open each file manually and click "ctrl+shift+O" each time i saw "import" warnings there. it would be cool to have some automatic feature like search with these imports, to review everything for the whole project, not a single file...

              • 4. Re: found 2 bugs in new Flash Builder 4.7
                Gaius Coffey Level 2

                How is it possible for there to be such a gloriously fabulous shortcut as "Ctrl+Shift+O" and me not to know about it? You've made my day just there. I've spent about the last five minutes deliberately looking for old, monster code files to clean up!


                I think we'll have to wait for 4.8 for global ctrl+shift+o function, though.



                • 6. Re: found 2 bugs in new Flash Builder 4.7
                  cosmacol Level 1

                  I can confirm the bug about incorrect "unused imports" warnings (and organize import will happily remove them, actually breaking the code).


                  The case is when a class is only referenced in MXML. In my cases, for example, I have an Assets class with static references to commonly used embedded assets, never used in actual code but only as a source for data biding (e.g. <s:Image source="{Assets.ICON_VIEW}"/>) and it is ALWAYS reported as an unused import in Flash Builder.


                  This is very annoying, as it produces unwanted warning and prevent me from using CTRL+SHIFT+O all the time, that would be a very, very useful feature otherwise. Unfortunately, I cannot see any workaround.

                  • 7. Re: found 2 bugs in new Flash Builder 4.7
                    BrianR-Teo Level 1

                    I can also confirm this obnoxious bug.  It appears to only happen with MXML binding (static, class references, etc).

                    • 8. Re: found 2 bugs in new Flash Builder 4.7
                      Haibarbe Software

                      The same for me, too. These warnings are really annoying.

                      I work on a Mac and <Apple>+<Shift>+<O> works well to strip imports that are really not used - other imports that are warned as not used stay in the script.