Adobe AIR and Microphone Support

So one of the cooler features of Adobe AIR is it's ability to work with the user's microphone. I whipped up a quick sample of this feature today that demonstrates this. In this first entry we are simply going to monitor the user's audio and in the next entry I'll discuss how you can actually save the recording.

[More]

Update to my 911 Viewer

Way back in January of this year I blogged about a little experiment I did parsing local traffic-related incidents in my home town. A local police department had posted their data in HTML and I used a combination of YQL and ColdFusion to parse it. This was done via a simple scheduled task. A second task turned street addresses into longitude and latitude pairs. Finally I made use of cfmap to display the results. All in all, I think it was pretty cool. The results matched with what I would have assumed were the busiest streets. But yesterday I discovered something cool. Apparently I left the process on and it ran for six months.

[More]

ColdFusion's Multi File uploader is impacted by debugging

Ok, so this probably falls into the realm of "Obvious", but both myself and a reader were surprised by this. Credit for it goes to John Pansewicz. He pinged me earlier this week saying that ColdFusion 9's multi file uploader failed to work for him. No matter what he uploaded he got a bad result. I tried the same code on my machine and saw nothing wrong. Then John figured out that it was ColdFusion debugging breaking the response. Again - obvious - but I tend to only worry about debugging when running against CFCs and Ajax applications. The multi file uploader is a Flash application and it just didn't occur to me that I had to be concerned about it. However - if you look at the docs for the feature (see here) you can see that JSON must be output to the control for it to know how the files were processed. Anything that breaks that JSON (including ColdFusion debugging) will make the control think the files had an error during the upload.

Finally - don't forget that you can turn off debugging on a request by request basis. Don't think you must completely turn off the feature if you have one bit of JSON in your local project. Just make use of the cfsetting tag to disable it for that particular request.

Cumulative Hotfix for 901 Released

The title pretty much says it all. You can get a new hotfix for ColdFusion 901 here: Cumulative Hotfix 1 (CHF1) for ColdFusion 9.0.1

Note that this addresses the JSON issues folks were having issue with!

Speaking at RIAUnleashed

Brian Rinaldi has updated the schedule for this years RIAUnleashed conference. The line up looks incredible. You've got a great list of speakers along with a great list of sessions. My topic is on ColdFusion and Solr integration, with the catchy title of ColdFusion, Solr, and Killer Robots. After my impromptu session on Solr at this year's CFUNITED, I thought it would be nice to do something a bit more formal. I'm also going to be creating a real (if small) application to demonstrate how effective Solr can be for your web site. I highly encourage folks to register today for the early bird price. Last year's conference was great and I think this one will be even better.


Small formatting issue with emails sent via ColdFusion 9 Mail.cfc

Using the new mail.cfc to send emails in ColdFusion 9? You may notice an odd formatting issue. Check out this screen shot:

I thought this was whitespace in my code, but turns out it is the code that implements mail in script. Find base.cfc in your cf install\customtags\com\adobe\coldfusion folder. Open it and go to line 417. (Note - the tags as script stuff changed in 901. So if you are still on 900, your line number may be different.) On line 417 you will see #mailbody# as a variable, tabbed over. Simply remove the tabs. Here is a slice of the file:

Quick note - the white space did not render perfectly on my blog - so you will just have to imagine that mailbody is the online code all the way to the left.

   view plainprintabout
 <cfmail attributeCollection="#tagAttributes#">
 #mailbody#
  <cfloop array="#params#" index="mailparam">
  <cfmailparam attributeCollection="#mailparam#">
  </cfloop>
  <cfloop array="#parts#" index="mailpart">
  <!--- Capture mailpart content into a local variable and delete body attribute --->
  <cfif structkeyexists(mailpart,"body")>
  <cfset var mailpartbody = mailpart["body"]>
10   <cfset structdelete(mailpart,"body")>
11   </cfif>
12   <cfmailpart attributeCollection="#mailpart#">
13   #trim(mailpartbody)#
14   </cfmailpart>
15   </cfloop>
16   </cfmail>

This fixes it up. You still get some whitespace after the message, but that should be pretty much invisible to the end user. You could remove all the white space if you wanted to, but I thought that was overkill.

CF901 CFGRID's new multirowselect feature

Earlier this week a user asked me to look into something odd with CF901's new multirowselect feature for cfgrid. If you haven't played with this yet, it is a way to enable multiple row selections in a grid. Unfortunately it doesn't quite work as advertised, but in this blog entry I'll tell you how to make it work.

[More]

ColdFusion Unconference - Sessions Announced

So this was actually announced quite a bit earlier on Twitter, but as I've been bug hunting all day I didn't get a chance to blog about it till now. You can now find the official list of sessions and speakers for the ColdFusion Unconference here:

ColdFusion Unconference

I've actually purchased a nicer domain name but haven't yet hooked it up. Ignoring that though - check out the list of speakers and sessions. This is a fracking rock star set of content if I may be so bold. (Yes, I will be.)

I will also remind people that you can attend MAX for the low cost of 200 dollars. Yes, 200 bucks. That gives you that "Exhibits-only" pass which allows you access to all 4 Unconferences. (Yes, there are 3 other ones as well. But all the cool kids will be at the ColdFusion one.) I think it's worthwhile to go for the full MAX experience but if you are on a limited budget, this is definitely a great option.

I've only one thing left to say:

Big thanks to all the speakers who agreed to participate as well as Ezra Parker and Charlie Griefer for once again being co-managers of this event.

Select boxes that limit other select boxes

That title probably doesn't do a great job of introducing the topic, but hopefully it will make more sense by the time the entry is done. A reader wrote me this week asking how to create select boxes that all share the same options. However, as soon as you pick an option in one, that option would then be removed from the other ones. A good example of this would be sorting data. Imagine you had N products. For each product you want to assign a ranking to it. Only one product can be 1, only one can be 2, and so on. Imagine that as you selected a particular rank, that rank was then removed from the others. Here's how I solved the problem using a little bit of ColdFusion and jQuery, my peanut butter and chocolate.

[More]

Is HTMLEditFormat enough?

Patrick asks:

You schooled me on using vars in my cfc to help ratchet up the security. If I used the following code in my cfc that processes my contact form, do you feel like the data would be cleansed and relatively benign? I'm also using cfparams in the page with the form and validating it with jQuery and/or CF server side code (for non Java visitors) as well.

<cfargument name="email" type="string" required="yes">
<cfargument name="fullname" type="string" required="yes">

<cfset var elements = structNew()>
<cfset elements.email = htmlEditFormat(trim(arguments.email))>
<cfset elements.fullname = htmlEditFormat(trim(arguments.fullname))>

[More]

More Entries