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

Broken content assist

Explorer ,
Feb 04, 2011 Feb 04, 2011

Copy link to clipboard

Copied

With "content assist" I mean the feature that pops up a selection of choices to complete the code you are writing, such as function & class names and variables.

Now, I just figured out why it doesn't sometimes..

My code looks like:

var prds:Array = new Array();

for each (var prd:Product in prds) {

// empty

}

prd.foo();

Content assist fails on the last line. It does not provide any suggestions based on Product for the variable "prd".

However, the code compiles, of course, without errors or warnings.

Is there a bug report on this?

PS: Of course I could declare the "prd" variable at top-level and then it would work. The point here is that content assist fails on code that compiles.

Views

441

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

Deleted User
Feb 04, 2011 Feb 04, 2011

That is because till FB 4.0.1, variables were being scoped at block level in Flash Builder's code model. So in your code, 'prd' variable is visible only inside 'for' block. This is fixed in newer builds ( https://bugs.adobe.com/jira/browse/FB-27662 )

-radhakrishna

Votes

Translate

Translate
Guest
Feb 04, 2011 Feb 04, 2011

Copy link to clipboard

Copied

That is because till FB 4.0.1, variables were being scoped at block level in Flash Builder's code model. So in your code, 'prd' variable is visible only inside 'for' block. This is fixed in newer builds ( https://bugs.adobe.com/jira/browse/FB-27662 )

-radhakrishna

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
Explorer ,
Feb 04, 2011 Feb 04, 2011

Copy link to clipboard

Copied

LATEST

Cool, cheers

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