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

found 2 bugs in new Flash Builder 4.7

Guest
Dec 07, 2012 Dec 07, 2012

Copy link to clipboard

Copied

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

Views

3.6K

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
Dec 09, 2012 Dec 09, 2012

Copy link to clipboard

Copied

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

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
Enthusiast ,
Dec 13, 2012 Dec 13, 2012

Copy link to clipboard

Copied

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

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
Dec 17, 2012 Dec 17, 2012

Copy link to clipboard

Copied

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

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
Enthusiast ,
Dec 17, 2012 Dec 17, 2012

Copy link to clipboard

Copied

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

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
Dec 18, 2012 Dec 18, 2012

Copy link to clipboard

Copied

ha-ha. agree.

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
Participant ,
Feb 08, 2013 Feb 08, 2013

Copy link to clipboard

Copied

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.

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 ,
Feb 21, 2013 Feb 21, 2013

Copy link to clipboard

Copied

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

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 ,
Dec 04, 2013 Dec 04, 2013

Copy link to clipboard

Copied

LATEST

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.

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