ColdFusion, WordPress, Flash & other web things


Oct 12

appConstants plugin: New version

I have updated the appConstants Mach-II plugin in the downloads section. The plugin now allows you to define a set of constants for more than two environments. I made this change because of a recent move to version control within our team. Each developer in the team can now have a set of constants for his or her local machine.

Oct 12

Mach-II site launch (delayed)

Back in July of this year, we launched our first full size commercial Mach-II application: Norman Spence Online. It has just been added to the list of Who’s using Mach-II on the Mach-II.info site. Don’t be fooled by the static URLs: we are using URL rewrites (ISAPI Rewrite). We are very pleased with the result and so far, maintenance tasks have been a breeze. Long live Mach-II!

Norman Spence Online screenshot

Oct 12

My plugins now on Mach-II.info

Phil Cruz has added my layoutManager and appConstants plugins to the Mach-II.info exchange! Thanks Phil!

Oct 12

Changes to 1 Pixel Out

After the considerable increase in visibility that Sean’s post created, I thought it was time to start posting again. How better to start than with a few minor improvements to my blog? Here they are:

  1. Several sections of the side navigation are now expandable/collapsable.
  2. There is a new links section in the side navigation.
  3. Conditional gets are now implemented on the RSS feed to minimise news reader bandwidth usage (you can find out more about it here). This was pointed out to me by Erki Esken. Thanks!
  4. Firefox users can now subscribe to the RSS feed with the browser’s new RSS button.
  5. I added a skip navigation hidden link à la Mezzoblue.
Jul 13

trim() treachery

trim() is probably the CF function I have used the most throughout my career. Today, this trusted and straightforward function behaved in the most unexpected way: it didn’t trim the string!

Now, the string I was attempting to trim was passed in from a textarea and had been pasted in from a spreadsheet cell and… IT DEFINITELY HAD A TRAILING SPACE! And this is the weirdest bit: when I ran the code in Firefox, the string ended up trimmed but in IE, the string still had the trailing space… ??!!!?

I even tried a regular expression (REReplace( string, "[[:space:]]+”, “”, “ALL” )) to remove all spaces but that didn’t remove the trailing space either.

I eventually found out that the problem was due to the trailing space being a non-breakable space (ascii 160). This special breed of white space must be immune to trims and excluded from the :space: family, which I suppose actually makes sense (“non-breakable” kind of means “non-removable”).

The fact that the space had been removed when using Firefox must mean that Mozilla browsers send non-breakable spaces as regular spaces.