Blog Entry 7 years ago

Flash Builder - Code Assist not working

I have to confess that I don't have enough self-confidence to work with Flash Builder without Code Assist (differently with Python). Sometimes, Code Assist denies to work. This causes pretty much of trouble when the project is big and in rush. I googled a lot but couldn't found any applicable solution. Some would work one other cases but not this;

Sometimes, Code Assist denies to work. This causes pretty much of trouble when the project is big and in rush. I googled a lot but couldn't found any applicable solution. Some would work one other cases but not this; So, firstly, I'm pretty sure this is an issue of FlashBuilder (for some recent versions) and it could be triggered by multiple factors.

After some hours of monkey-ing, I found the guilty place.

if (foo > 0)
    try {
        figureList.selectedIndex = 0;
        showFigure();
    } catch (e:Error) {
        trace("Error when showing the first figure");
    }

After some more minutes for trying different cases, I saw that there is not only one but two triggers in the same block.

Okay, finally the Code Assist works only if:

1. There are {} brackets for IF statement:

if (foo > 0) {
    try {
        figureList.selectedIndex = 0;
        showFigure();
    } catch (e:Error) {
        trace("Error when showing the first figure");
    }
}

OR 

2. There is nothing inside the CATCH block:

if (patent.Figures.length > 0)
    try {
        figureList.selectedIndex = 0;
        ShowFigure();
    } catch (e:Error) {
        // COMMAND THIS OUT
        // trace("Error when showing figure 0");

    }

That's it. Hope that I don't have to find another cause for Code Assist anymore, and hope you will find this helpful.

Recent Reads