Unexpected Structure Behavior with {}

A gearYesterday I ran into an interesting issue with one of my applications that lead to an even more interesting discovery about how CF8 executes the {} notation for creating structures.

 

Use $ to Instantiate Java Nested Static Classes in ColdFusion

Ok, so this isn't news; apparently its common knowledge to some that you can instantiate a nested Java class by using a $ instead of a . in the name:

<cfset local.RoundRectangle2D = CreateObject("java", "java.awt.geom.RoundRectangle2D$Float") />

I'm posting this because I found it impossible to locate this information on the web. I even had an Adobe tech tell me he was logging a bug that CF couldn't handle nested classes, because even he didn't seem to know that you could do this. Its now in the CF8 LiveDocs, and its now on my website. Perhaps the next person in line will be able to find it easier.

 

Transparent Rounded Corners for the Masses

Ok, so a late night of coding here… I should have been in bed like 2+ hours ago, but its all worth it because I've got it working: fully transparent rounded corners on your images. Just hit "more" to see the code.

 

Why No News?

Although I'm sure my list of loyal followers is small to non-existent, I do want to apologize for my silence over the last few weeks. Work has kept me coding 9 to 10 hours a day, so by the time I get home I'm not too interested in programming (if I even have time before I have to hit the sack). Once I get back in the groove I'll be working on the following topics:

  1. Transparent rounded corners for images - Yes, I think I know how to do it now
  2. BlogCFC Theming Updates - There are new versions of BlogCFC, and I want to try to see if Ray Camden is interested in incorperating theming into the core BlogCFC

 

Escaping Console.log()

Firebug icon Ray Camden just Twittered about checking in code that still has console.log() in the Javascript. He rightly points out that console.log() causes problems for browsers that don't understand it, but you don't really have to have Firebug installed as some browsers like Chrome understand it natively. Rather than try to purge my code of console.log(), and need them again later, my solution is to add an "escape" that lets console.log() evaluate harmlessly on browsers that don't support it. Click more to see the code.

 

Royksopp On Design

Ok, so not the most serious post, but Ray Camden Twittered about this video, and I have to say that it has some amazing diagrams and charts in it. I can't help but think that Edward Tufte would like it.

 

More Entries

Jon Hartmann, July 2011

I'm Jon Hartmann and I'm a Javascript fanatic, UX/UI evangelist and former ColdFusion master. I blog about mysterious error messages, user interface design questions, and all things baffling and irksome about programming for the web.

Learn more about me on LinkedIn.