Five Cool Additions and One Undocumented Function in 8.0.1
ColdFusion 8The release notes for ColdFusion 8.0.1 detail 10 pages of tweaks and new features. Here are five cool additions, and one undocumented function, in no particular order:
- Leopard and 64 bit support
Considering the devoted followers of both CF and Apple it was no surprise to see install solutions for CF8 popping up within hours of Leopards release. As cool as that is a supported release along with 64-bit support is extremely nice. And, wow, the speed of CF8 on Leopard 64 bit is impressive; re-inits take half the time they use to. - Nested Implicit Structure/Array
Nested structures and arrays have always been possible. Now the implicit expressions work as well like so:<cfset variables.nestIt = {a=[{no="you did not", yes="I did", oh=["and on",["and on"]]}]}> - cfwindow refreshOnShow attribute
When using a source for cfwindow the default behavior is to cache the response for when the window is closed and then opened. I recently stumbled into this problem in an application I'm building. When refreshOnShow = true anytime the window is shown the content will be grabbed from the server. - Watermark with html
cfpdf action="watermark" can now take html with formating in addition to an image. A nice, nice addition. - Richtext area for Safari
Finally! WYSIWYG textarea support for Safari (3.0 and up) users. Big thanks should go to the FCKEditor team on this one since its their work along with Adobe's integration that makes it possible to doand have a rich textarea. I am especially happy with this as Safari is my current favorite browser (this can and does change often).
The other addition is an undocumented function: getPrinterList() that well, returns a list of printers that cfprint can print to.
(I will be presenting "Creating, Manipulating and Printing PDFs" and "Intro to CFML as a Language" at CFUnited in June.)
Make Your Users Life Easier Not Yours
UII was checking in online last night for a flight and came across a classic example of asking the user for perfect user input when it would be easy for the programmers to simply clean up any bad data. In situtations like this I believe the onus is on us, developers and programmers, to make our users lifes easier not ours.
Lets look at an example, the Southwest online check in screen which has the following bizarre instruction: "Confirmation Numbers use the letters O and I instead of the numbers 0 (zero) and 1 (one)."
Fixing any user input on the server side could be achieved very easily with a simple RegEx making the page both easier to use and clear of instructions.

A quick note about Southwest: I actually have a lot of luv for Southwest and without them would see my relatives a lot less.
Another quick note: I'm sure I have made my users lives harder than need be in the past with fields like this (though I have also discovered a recent fondness for the masking features in cfform).
cfaui (Adobe User Intelligence) tags and functions up on Adobe Labs
ColdFusion 8The most exciting feature of the ColdFusion 8 Updater 1 (now posted to Adobe Labs) is the new cfaui tags and functions. aui stands for Adobe User Intelligence and allows us CF developers to do a whole bunch of new cool stuff (rumors suggest a Flex version is on the way as well).
It is based on the technology in cfajaxproxy and the embedded Apache Derby database and can be added to any page by placing
<cfaui action="track" trackID="#session.userID">
anywhere on the page. This will track all actions a user takes on the page, store it in a database and constantly analyze it. The first cool usage is the action="hover" attribute which after a set period will display the text in any element defined on the page. Here's an example:
<cfaui action="hover" element="hoverTR" milliseconds="1000"
messageElement="messageSpan" message="Most people pick chocolate" />
<tr id="hoverTR">
<td>Favorite Ice Cream</td>
<td><input type="text" name="favIceCrean">
<span id="messageSpan"></span></td>
</tr>What this does is after 1000 seconds of a user hovering over the the tr with the id of "hoverTR" it will place the content of the message attribute in the span with the id of "messageSpan".
One UI challenge I have always faced is whether to use a text box or select box for collecting a US state. Well with the new auiInputPreference function its now possible to give the user what they would prefer. Look at this example:
<cfif auiInputPreference(session.userID, "keyboard")> <input type="text" name="state"> <cfelse> <select name="state">.... </cfif>
The auiInputPreference function will always return a boolean. In this example I ask if the user has shown a preference for using the keyboard and if so will display a text box, if not (and in this case it would mean they lean towards using the mouse to move between fields) show a select box.
There are many other cool functions and features of the aui suite of tags and functions. Head over to the Adobe Labs and check out the documentation on the beta for ColdFusion 8 Updater 1.
Spotlight vs the Dock
Apple
For years I have liked the Mac OS Dock and found it to be very useful. Over the last couple of months, however, I found I had too many programs in it and opening a n application took some time. So, I starting drifting towards using Spotlight to find my programs which is noticeabley faster. To find an application (or anything in Spotlight) the keys are: command+spacebar then the first few letters of the application. Over time Spotlight learns what you search for and highlights them first. I can type command+spacebar s and have Safari listed in a split second.
My next step was to move the Dock from the bottom of my screen, where I found it hard to know what was open in Leopard, to the left side and strip it of all programs except those that I set to open at login (Mail, iCal, iChat). This gives me a little more room on the bottom of the screen and by using Spotloght the ability to open up applications or contacts or documents very easily. It also helps that I have a new Apple Keyboard that makes typing almost effortless.
My new Dock set up is on the left with Finder, Main, iCal, Safari, iChat, Activity Monitor (set to display RAM usage), Eclipse, XCode, MySQL Administrator, Firefox and CSS Edit all open.
Hear me on the ColdFusion Weekly Roundtable
ColdFusion WeeklyAlongside the soothing voice of Matt Woodward and the midwestern mellow voice of Peter J. Farrell, the ColdFusion Weekly podcast now has a regular roundtable of opinionated ColdFusion developers to discuss the latest issues. This week you can hear my London-but-most-people-think-is-Australian accent giving my opinions on open source and free versions of ColdFusion.
Its a very interesting discussion made so with the spirited opinions of Brian Meloche, Terrence Ryan, Brian Swartzfager, Kurt Wiersma and Dan Wilson.
Listen to this weeks podcast (Version 3.04) by clicking here or search for "ColdFusion Weekly" in iTunes.
Solution to CVSNT Permission Denied Error Message
CVSThe problem:
A CVSNT user can commit some files but other files come back with a rather cryptic message saying permission denied:
The server reported an error while performing the "cvs commit" command.
version3: cvs server: cannot change mode of file /cvsrepos/test.cfm,v: Permission denied
version3: cvs [server aborted]: cannot rename file /cvsrepos/,test.cfm, to /cvsrepos/,test.cfm,: Permission denied
This is caused by the Windows account associated with the cvs user not having enough permissions to overwrite files saved by another Windows and cvs user.
The Solution:
Grant the Windows user associated with the cvs user more permissions in Windows.







Loading....