Home > Eclipse, Flex Builder, code > Remove View Source From Context Menu

Remove View Source From Context Menu

December 14th, 2008 Gareth

I had decided to create a demo application for my Flex Date Utils library. I thought it might be nice for people to just be able to see exactly what the library can do without having to download it and compile it. Right now it is just for the DateUtils portion of the library, but I’ll be adding Holiday and BusinessDay to the mix soon.

In order to make what I did more visible, I decided to enable the source code view when exporting the release build of the project. After exporting the file and FTP’ing it to the server, I started to have some difficulties getting the source code view working properly. Rather than wasting more time trying to get it working, I decided to just uncheck the Enable View Source check box, and re-export the project. However, when I went to my swf and right clicked on it, “View Source” was still an option in the Context Menu. I went back and tried cleaning my project, re-exporting it, deleting the swf and recreating the project. Nothing seemed to be working.

I then figured I would try creating a new project and placing it under there. As I was pasting the new application file, I noticed one new line had been added to my file

Apparently when the compiler enabled “View Source”, it adds this line of code. However, when it re-compiles the code with “View Source” disabled, it does not remove that attribute from the application tag. 30 minutes and lots of yelling later, this has now fixed the problem. It would be nice if Adobe included this little tidbit in their livedocs as “make sure to check this”.

The demo app can be viewed here for anyone interested.

  1. December 14th, 2008 at 00:17 | #1

    I’ve been working on something very similar to this lately, however it’s adding timezone support to the DateFormatter class as well as a setTimezoneOffset method to the Date class itself. If you’re interested, I’d love to work with you on this.

  2. Rui Baeta
    November 10th, 2010 at 12:06 | #2

    I’m interested in timezone support you mentioned! I see that your post is 2008, are you still on this subject?
    You may reply directly to rui dot baeta at alert-online dot com
    Thank you!

  1. No trackbacks yet.
Comments are closed.