I rely heavily on flashlog.txt for tracing Flex code. But I just couldn’t get the flashlog.txt to go today — I am rebuilding my box.
So I started looking at the Adobe technote on this matter “Debugging Client-Side Code in Flex Applications”. However, the Flash movie on this technote was not giving accurate information about my Flash player.So after looking around a little more, I found another technote called “Version Test For Adobe Flash Player” that correctly identifies my Flash player.
So I have the correct version of Flash Player, but I still couldn’t get the flashlog to record any trace output. My mm.cfg file was configured correctly and was present at the correct location. There was a blank flashlog.txt file in the location specified in mm.cfg. But no matter what I did, it did not trace any output.
Then I came across the following in the Flex Builder documentation:
The default log file location changed between the initial Flash Player 9 release and the Flash Player 9 Update. In the initial Flash Player 9 release, the default location is the same directory as the mm.cfg file and you can update the log file location and name through the TraceOutputFileName property. Beginning with the Flash Player 9 Update, you cannot modify the log file location or name and the log file location has changed, as follows:
C:\Documents and Settings\user_name\Application Data\Macromedia\Flash Player\Logs
I checked the location mentioned here, and the file was there and has the trace information!
It was the move from Flash Player 9 to Flash Player 9 Update that caused me this grief.
And why is it still in C:\Documents and Settings\user_name\Application Data\Macromedia\Flash Player\Logs directory?
Why not C:\Documents and Settings\user_name\Application Data\Adobe\Flash Player\Logs?
By default the directory listing is turned on on GlassFish application server. This is great while developing as one can see list of files and folders in one’s web application.
However, on a live web application, the need for greater security necessitates that directory listing is turned off so that users are prevented from browsing files and folders in one’s webroot.
To turn off directory listing is a two-step process. First, set the “listing” node to “false” in config/default-web.xml file. And second, redeploy the web application in question. Just changing the default-web.xml won’t suffice. Once the web application is redeployed, the directory listing is turned off.
Just so that I don’t forget…
While installing JBoss, I found that I need to setup my JAVA_HOME variable correctly.
After checking a couple of sites, I found the following to be a good way to figure out and setup JAVA_HOME variable on Mac OSX.
In a Terminal window, type
This pointed to “/usr/bin/java“, which was a symbolic link to “/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Commands/java“. This in turn was a symbolic link to “/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2“.
So my JAVA_HOME was pointing to “/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home“.
In order to change the JAVA_HOME variable I found a very nice utility called “RCEnvironment” that let me setup all kind of environment variables, including JAVA_HOME, very nicely and easily.
Once I added a JAVA_HOME variable (and pointed it to Java 5 home using RCEnviornment, I logged out and back in again. My JAVA_HOME was setup as I wanted.
I just saw that Universal Mind Cairngorm extensions for Flex are now set up on RIAForge (thanks Andrew).
We have been using the UM Cairngorm Extensions at Straker Interactive (where I work) for ZoomFlex since about six months.
One of the features that I really like about the UM extensions is the ability to combine together event-business logic. Given that any real-life application (like ZoomFlex) has quite a few commands, having a separate Command class for each command can become quite overwhelming. The ability to aggregate command logic into context-specific command classes is very useful.
Thomas Burleson, Principal Architect at Universal Mind, and the owner for Google Code repository for the project, introduced me to the extensions.
I’m soon going to start working on redoing the two sample Flex-based Cairngorm applications (RSS Reader and Contacts Manager) I did earlier into Cairngorm with the UM twist.
I’ll post links to these over the next few weeks. In the meantime, if you want to have a play with doing that, feel free to check out these apps from Google Code, and drop me a line (at indy [at] nagpals.com) so that I can set you up to commit changes back in.
Update (7 March 2011): The project has been moved to GitHub.
I’ve just setup a Google Code GitHub project for the sample contact manager application I had written a while back.
The contact manager used Flex, Cairngorm framework and ColdFusion backend.
The original version of the application was based on Cairngorm .99.
I’ve been working on upgrading the application to Cairngorm 2.2.
You can download the application: CFCairngormContacts.zip
Installation instructions are on the Wiki page.
You can also check it out from the Subversion repository.
Installation instructions are at: https://github.com/indynagpal/CFCairngormContacts and you can check out the source code from there as well.
I’ll shortly be posting a link to the Cairngorm 2.2 version of the application.
It’s been an instructive exercise to upgrade the application from Cairngorm 2.0 to 2.2.
I’ll be blogging that in the next couple of days.