Oh jeez. I remember Flex Builder 3 making it easy for people to just right click your application and view source. What’s happened here?
Quick answer is:
Listen for the applicationComplete event and add the menu item:
The long answer is that I spent the better part of an afternoon looking for an easy way to have Flash Builder do what it used to do (generate and show my source code). I was seeing Flash Builder to crazy stuff like rip out the “viewSourceURL” tag from my WindowedApplication. I figure there’s some sort of setting in the project properties that is set to kill stuff like this when doing a production release but I couldn’t seem to find it. Is my hair falling out?
Oh, and yes, I’m talking about Adobe Air here. I see everything seem to be in order when doing a Flex browser application.
To generate the view source files I fired up an old version of Flex 3 and when I went to the export wizard it had that old familiar “Enable view source”. I pulled in a more modern compiler but Flex Builder didn’t seem to get the build right. But it did generate the viewable source code. So I took that code and posted it online. Then I switched back to Flex 4.6 and made the actionscript call to add that source menu:
protected function applicationCompleteHandler(event:FlexEvent):void
So while this solution works, I’m sure there’s some really simple way to get my old familiar wizard back.
What am I doing wrong here?