Flex Gotcha 1 – where have my code hints and colouring gone?

Ok not really basic web development but this is a gotcha that has really wound me up with Flex Builder 3 beta.  I’m not sure if this happens with other versions of Flex Builder.

Here’s the scenario (or at least the one I had).

You’re working on two machines, one at the office the other a laptop, or somewhere else.  You copy a file from one to the other and go to Flex Builder to work on it.  You’ve lost your code hints and colouring.  Hmm.  Not the end of the world, but if you’re like me the code hinting is one of the most important things about using Flex Builder (or Eclipse), you may as well be working in Wordpad.  OK.  Maybe it doesn’t like the file.  I know I’ll save the file as another name, delete the file I’ve got problems with and then rename the new file back to the original anme.  That should sort out the problem.  Nope.  When the file has it’s new name all the code hints work, change it to the filename you want, boom all the code hints are lost again.

If I was really clever I’d be able to tell you why.  I’m not, so I don’t know.  But I do know a work around, and the scenario why this happens (at least for me).

Basically this happens to files that are open int the Flex Builder workspace, EVEN IF FLEX BUILDER IS NOT RUNNING.  So for example you have a file called foo.mxml open in Flex Builder.  Close Flex Builder without closing the file.  Overwrite foo.mxml with another mxml file.  Open Flex Builder, no code hints or colouring on the new foo.mxml file.

Workaround – close all open files in Flex Builder.  Close Flex Builder.  Overwrite file again.  Open Flex Builder.  Open foo.mxml.  Code hinting and colouring back.  Yay! And there was great rejoicing.

Not earth shattering, just stopped me throwing my toys out the pram.

tim

Tags »

Author:admin
Date: Tuesday, 27. November 2007 23:46
Trackback: Trackback-URL Category: Flex Builder

Feed for the post RSS 2.0 Comment this post

1 Comment

  1. 1

    You could try closing the file, select it from the flex navigation pane and hitting F5 to rebuild.

Submit comment