Tuesday, January 23, 2007

New blog is up

Hi all,

My new blog is up. I will not be posting any more blog entries to this blog. Please check out my new blog at:

http://www.dkferguson.com/BlogCFC/



Thanks,

--Dave

Friday, January 05, 2007

Flush output from inside cfscript

So, you have a huge cfscript section but you want to flush some output without ending the cfscript? Maybe you are looping over some data and want flush out some data as it loops. Now, I bet you are thinking what I was. How can I do this? I can't use cfflush inside cfscript. You are right, but there is a way. Try this:

getPageContext().getOut().flush();

This works just like cfflush. It will flush all generated output to the browser. But, you can use it inside cfscript!

That is it for now,

--Dave

Wednesday, January 03, 2007

My article is comming out!

The December '06 issue of the Coldfusion Developer's Journal will have my article in it. The article covers some interesting ways to get around a couple issues with the directory watcher gateway.

--Dave

Tuesday, January 02, 2007

Query columns = CF Objects

I spent about 30 minutes this morning tracking down a bug. For the life of me I could not see what the problem was. I had a asynchronous event throwing an error and the error in the logs stated there was an error invoking the event gateway. However, due to the way that CF logs errors the message, however accurate, did not give very much detail as to where the error actually occurred. So, I turned on my custom debugging for gateways that I wrote and was able to track down the error. The error was actually in an include not the async code itself. Finding it was one thing. Then trying to figure out why there was an error was a different story.

I had a query output where one of the columns was "client". Now, normally this would not be an issue. However, there was an error in the query so the column "client" was not in the query. Thus CF tried to use the client scope for the output. Since I was trying to output a simple value "#client#" it threw an error "Complex object types cannot be converted to simple values".

The moral of the story:

Avoid using CF objects like "client" as column names.

--Dave

Monday, January 01, 2007

Happy New Year

Have a great year. May the forces of evil become confused while tying to find you.

--Dave