Flex Builder 3 Bug?
I came across something really unusual today on the Adobe Flex Builder 3 Beta (codenamed “Moxie"). For clarification sake, I installed it as a Eclipse plugin rather than the Flex Builder 3 standalone.
The version for Eclipse was 3.3 and according to the name of the file, the Flex Builder plugin was version 3 Beta 1 (dated 11th June 2007) and I am running on the Mac OS X.
Seen anything odd from the screenshot taken above? Take a closer look.. for some strange reason, the Flex Builder did not complain of syntax errors even though I typed some garbage in that class file. If I did the same on the main ActionScript file (in this case “Test.as"), Flex Builder will complain of syntax errors and actually highlight the error.
Anyone else have seen this happening before? For my sanity sake, I hope it is a bug though I am pretty sure it must be some silly issue. I knew it was too good to be true when I am coding for a few hours and I hardly see any errors reported by Flex Builder.
Everything else like the code completion and contextual code hint works dandy and great. On a side note, for those on a Mac, the Eclipse is offers a powerful punch as an IDE. It has loads of plugins which can be used for most languages: PHP, Rails etc. I have yet to discover a really good IDE for ActionScript on a Mac, the next closest is TextMate.
Update: It is a silly mistake after all. There were no references to the class and hence the Flex Builder will not complain of errors! This is what happen when you are lazy and used the “Automatically declare stage instances” in the Flash IDE. I was toying with the approach of having Flex Builder to code the classes and then getting Flash IDE to publish the swf. With the feature of automatic declaration, I left out defining some variables and hence no references to those class files.
Robert Hirst
I suppose it’s for efficiency/file size that non-referenced files aren’t included in output, but this problem boils down to something I’ve wondered; why there is a need to make swf and swc distinct entities, rather than try and follow the Java model of simply having jar files which can be executed or used as libraries. Again, it’s probably an legacy/efficiency thing, but I’d still like a third way… an swj or something…
Where the handling of Java classes and AS classes most noticeably differs is that a Java build path is recursive and has include/exclude rules, whereas a Flex/AS Project requires each class to be explicitly included, either by reference from the main app for normal projects, or in the Library Build Path for the libraries.
Anyway, don’t take my word on any of this (corrections welcome) as I’m still learning more about Flex every day (although I have recently passed the Flex certification exam, woohoo!).