Skip navigation
infeter
Currently Being Moderated

found 2 bugs in new Flash Builder 4.7

Dec 7, 2012 5:36 PM

Hello.

 

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...

 
Replies
  • Currently Being Moderated
    Dec 13, 2012 2:46 AM   in reply to infeter

    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.

     

    G

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 17, 2012 8:45 AM   in reply to infeter

    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.

     

    G

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 8, 2013 12:49 AM   in reply to infeter

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 21, 2013 3:39 PM   in reply to cosmacol

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

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 4, 2013 3:48 PM   in reply to BrianR-Teo

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points