development

Cyclic Graph Safe CFDUMP Replacement? Check.

On the Fusebox 5 mailing list this evening, Brian Kotek mentioned the inability to CFDUMP the myFusebox object because CFDUMP can't handle the cyclic nature of the object's internal data structures. While dumping myFusebox (which is a CFC instance) is probably a "silly" thing to do (Sean Corfield from the same thread: "Mind you, [...]

Wednesday Contest Solution (pt. 2)

And here's the extra credit solution:
<cfif NOT isDefined("attributes")>
<cfset attributes = structNew() />
<cfset structAppend(attributes, form, false) />
<cfset structAppend(attributes, url, false) />
</cfif>
<cfparam name="attributes.width" default="100″ />
<cfparam name="attributes.height" default="100″ />
<cfparam name="attributes.backgroundColor" default="f7f7f7″ />
<cfparam name="attributes.borderColor" default="cccccc" />
<cfparam name="attributes.textColor" default="990000″ />
<cfparam name="attributes.text" default="Hello!" />
<cfparam name="attributes.textSize" default="16″ />
<cfparam name="attributes.textStyle" default="bolditalic" />
<cfparam name="attributes.textFont" default="courier new" />

<cfset fontArgs [...]

Wednesday Contest Solution (pt. 1)

Since I had a whopping zero takers for my contest, I'm thinking it won't be a repeat event. Here's my solution for the first portion of the challenge:
<cfif NOT isDefined("attributes")>
<cfset attributes = structNew() />
<cfset structAppend(attributes, form, false) />
<cfset structAppend(attributes, url, false) />
</cfif>
<cfparam name="attributes.width" default="100″ />
<cfparam name="attributes.height" default="100″ />
<cfparam [...]

Contest Update

For those of you who missed it, I posted a little contest this morning and have gotten a whopping zero submissions!  There is still time to submit a solution, but be quick, as my solution (just the base, not extra credit) will be published tomorrow morning.  I'll be posting a full solution (with the extra [...]

Wednesday Contest

Wednesday Contest

Today's contest uses the new image manipulation routines in ColdFusion 8. The objective is to take the custom tag/template skeleton below and add to it so that it'll generate the following image:

The tag/template can be invoked as a custom tag, or directly on the URL with URL and/or form parameters to set it's values. [...]

JavaScript. At Last.

Working on gpsracr.com this evening, and whipped open my favorite chunk of JS: Prototype. It just gets better all the time. They've added support for automatically executing text that is returned from an Ajax.Request with an appropriate MIME type (like text/javascript), which means you don't even need result handlers. Just dispatch to [...]

readGZippedText() UDF

I needed to read in some gzipped text files from disk, so I wrote a little UDF to do it for me, and thought I'd share.  It uses Java to do the heavy lifting under the hood:
<cffunction name="readGZippedText" output="false" returntype="string">
<cfargument name="filename" type="string" required="true" />
<cfset var data = "" />
<cfset [...]

Another Flex Weirdness/Gotcha

Another little gotcha to watch out for with Flex.  If you have an ArrayCollection of Objects that are backing a DataGrid, you can add/remove objects from the ArrayCollection and the DataGrid will update.  However, updating properties on the objects doesn't seem to update the DataGrid until you force a redraw via some other means (e.g. [...]

List/ComboBox Row Backgrounds in Flex

All the listy components in Flex (List, Datagrid, Tree, etc.) have a protected method called drawRowBackground which is in charge of drawing the background for a given row. You typically use it to color a given row based on some facet of the data the row represents (e.g. red background for rows with a [...]

i'm gonna go wii

News came back last night, my schema management tool won the Wii and CFUNITED ticket in the Open Source CF contest. After holding my wii in for the past few weeks, it'll be nice to finally let it out.