I have had a great many readers calling me and asking about the 2D barcode CFC mentioned in a recent post. You will be happy to know that it has been released. You can use this CFC to create 2D barcodes for printing and to read 2D barcodes containined in images. You can find the download link and read more about it on Ryan's blog. Keep in mind that the CFC is specific to CF8 and it uses a commercial (albeit inexpensive) Java library from Java4Less. Ryan and I would both be interested in any reviews or comments. If you end up using the tag we'd love to hear some follow-up on how it is being used.
I have a secret that has nothing to do with underwear. People think I'm pretty smart but the truth is that I'm surrounded every day by talented developers who know how to solve problems and find innovative solutions. Just rubbing shoulders with people like that tends to increase my level of knowledge and ability. Among those people is Ryan Stille, a Coldfusion and Linux Guru who has added tremendously to the wealth of knowledge here at CF Webtools. In the last few days Ryan has managed to piece together a cost effective and innovative solution for a customer who wishes to handle incoming faxes in Coldfusion. Eventually he will post a CFC on his blog - but meanwhile I wanted to explain the problem and the elegant solution involved.Read More
Testing Gurus like Dave Watts and Robi Sen will tell you that iterative tests are only interesting in a passing academic sort of way. Indeed if you are testing a real world application don't bother setting up a fancy-pants loop with 50,000 iterations to see if you should use "IS" or "EQ". If you are going to test then take the time to test real world operations in your application. But while we are on the subject of iterative tests I got to pondering what goes on under the hood. For example, what happens when you do "var1 IS var2" in a CFIF.Read More
If you have ever had to use a Java Widget from inside of your Coldfusion page you might know about the Javacast() function. Javacast allows you to bind a variable to one of Java's primitive "types" like string, long, float etc. Why is Javacast() necessary? I'm glad you asked. In the old days of Coldfusion 4 and 5, CF treated any variable as a sort of mystery meat. It didn't look too closely at it until you chose to do something with it. Only when an operation required a variable to have the properties of a certain type did Coldfusion complain. This is still true to a large extent today.
If you have a URL variable called "total" that is supposed to contain a number, you can populate it however you wish. You can put the string "sasquatch" in it for example. Coldfusion will ignore the type and pass the variable along right up until you try to add shipping to it, or divide it by another number or something. Only then will Coldfusion throw an error. Of course, using CFCs allows you far more control over the "type" of variables in play - but you can still treat your variables in this "weakly typed" way if you wish.
Java, on the other hand, is a strongly typed language. Variables are defined as "new" this and "new" that - where the this and that are classes or objects with methods and properties. So things written in Java don't take just anything for arguments to worry about at runtime. Javacast() was invented to convert Coldfusion variables into specific java types that Java methods are expecting. Take the following as example:Read More
I love the new widgety stuff in Coldfusion 8. The Cfwindow tag caught my attention right away. it seemed like a quick and easy way to frame content on a page and make it manageable. For example, I had a list of items that appear on the home page of our tracking system. It's the "hotlist" - a list of open and active work orders and projects. I decided to use Cfwindow to make it draggable and re-sizable. It was easy.
Since I loved the little drop shadow thingy I decided I would use it on the right hand side menu as well - just to frame in the menu with a header. Oops... this turned out to be quite difficult. Why? Because there is no way to anchor the window to the layout. The layout is dynamic on the right. The right hand menu "clings" to the right side of the screen - meaning the X and Y coordinates are different for each screen size. But the Cfwindow appears over whatever is on the screen and the "x" and "y" coordinates make it's position absolute. I went hunting for an answer.Read More