Dan Mackey On ColdFusion Development

ColdFusion, Java, .NET, AJAX, DHTML development and general programming. Daniel is owner and Administrator of CFTagStore.com and works for an Application Development Company in Ireland called Digital Crew. His interests cover all areas of programming in multiple languages with a particular interest in Internet Technologies.

All Articles Posted In October 2006
2006-10-31 12:45:00.0

Pandora's Box Update

Of all the features, updates and additions I added to Pandora's Box, the most frequent request from people was to add an apostrophe to the name :-) I have relented and added it to the latest version Version 1.3.8.

DOWNLOAD VERSION 1.3.8

Alot of people were also getting the infamous Runtime Error 91 message in Pandora's Box and for ages I couldnt recreate it. Tim from Pandora Stations helped me solve this and it boiled down to the station xml file. Apparently the fields in this XML file are not consistant and I wasnt catching this.

This is now fixed in the latest version of Pandora's Box.

The apostrophes is especially for Stephanie who also sent a very kind and substantial donation! Thanks Steph!

And a big Thank You to all people who donated so far to the Pandora's Box project. I have spent it on :

  • Beer - Had to be done :-)
  • A brilliant C# Book
  • Gordon Ramsays Kitchen Nightmares Revisited DVD set (which is brilliant!)
  • The Royal Family : Queen of Sheba DVD (I cried watching this....reminded my of my Nana)
  • The Godfathers Revenge Book (Mario Puzo) Next chapter of my favourite story!

I am also working on a dedicated site for Pandora's Box which will be up soon and moving it off my blog. The new site will also see Pandora's Box being opened up in some shape or form as an Open Source Project. I am thinking of developing it further in C# and have already got the basics running as a .NET 2.0 C# application.

Thank you to everyone who contributed comments, suggestions and encouragement. As always donated beer money goes along way to encourage development so if you like and use Pandora's Box, please consider clicking the donate button :-)

Tags: Pandoras Box
Add to your del.icio.us    DIGG This!    Technorati Cosmos Link    Post to Reddit    Add to your Furl    Add to Blinklist
Comments [59] - Leave a comment
2006-10-24 23:40:00.0

I love C# and Visual Studio

As mentioned in my last post, I am learning C# and so far I am loving it!

I have a pretty cool ColdFusion based Live Support application written and started the Operators console in Visual Basic 6 but I decided there is no better way to learn a new language than having to learn it in a productive way. I decided to put the VB6 version on hold and redo it in C#.

And you know what? Its fun! It reminds me of why I love programming so much. The satisfaction of actually accomplishing what you set out to do is second to none.

For me to be completely comfortable with my choice of switching languages, I decided to take all the knowledge I have in Visual Basic and make itty bitty projects accomplishing a specific area. I was pretty hot on the WebBrowser control and could beat it into any shape I wanted so that was the first thing I wanted to do.

Tonight I developed a full tabbed browser in C# with the ability to:

  • Add Tabs
  • Delete Tabs
  • Capture events from the DOM of the selected tab page
  • Interface with my C# application from the JS in the webpage.

The reason I need this is because the ColdFusion Live Support Application takes chat requests from a queue and when accepted by the operator, a new tab is created to hold the chat.

This was a major effort in Visual Basic 6 but it has taken me just under 1 1/2 hours tonight. I even went a bit further and created the whole thing in a reusable class for other projects.

I am really getting to love Object Orientated Programming and hope to use what I learned tonight for my next ColdFusion and Javascript projects.

Tags: .NET | ColdFusion
Add to your del.icio.us    DIGG This!    Technorati Cosmos Link    Post to Reddit    Add to your Furl    Add to Blinklist
Comments [3] - Leave a comment
2006-10-24 15:50:00.0

Visual Basic 6 And Internet Explorer 7

I am currently moving over to C# .NET for all my desktop programming but I have some legacy apps written in Visual Basic 6 that use the WebBrowser Control extensively. Plus, sometimes you dont want the overhead of .NET 2.0 just to knock out a quick app so Visual Basic 6.0 works perfectly in some scenarios.

Since I installed Internet Explorer 7 all references to the library that holds the Web Browser control are broken. I see lots of people around the net are having the same issues and there is a simple solution.

All you have to do is click Project and then Components, click Browse... and locate shdocvw.dll in the System 32 directory. This will restore the IDE back to referencing the correct .dll for the WebBrowser control and all other projects will load fine from then on.

UPDATE - Saturday 28th October 2006

I ran into a slight issue that took a while to figure out.
On the development machine, the VB6 IDE threw a strange error after the Navigate2 method is called. This error was something like "Runtime Exception -1 (FFFFFFF)". I couldnt figure out what it was because when I compiled the app and ran it outside VB IDE I didnt get the error. After a while I remembered that when I installed IE7 (I did this twice to see what would change on my machine) it reset some basic security settings. One of these is "Allow scripting of the WebBrowser Control". This was the culprit. If I checked this on, the IDE didnt throw the error.

Another thing to stress is that the end user of your application will have no problems if your VB6 App uses the WebBrowser control. Even if you have IE6 and they have IE7, your app is compatible.

As Tim mentions in the comments section, there are too many people knocking IE7 and having petty flame wars when in actual fact the impact of IE7 on legacy apps is minimal with the right information. Overall I am extremely happy with IE7 and am beginning to appreciate the effort Microsoft have put into it.

Add to your del.icio.us    DIGG This!    Technorati Cosmos Link    Post to Reddit    Add to your Furl    Add to Blinklist
Comments [53] - Leave a comment
2006-10-20 19:08:00.0

Testing IE6 Sites With IE7 Installed

When the second beta of Internet Explorer 7 was released I installed it and hated it. There was too much missing for me to feel comfortable using it and as a big fan of IE6 I was dismayed by the changes to the UI.

Today I said I would bite the bullet and install the full version of IE7 but was a little aprehensive as I would need to test my existing sites and applications in IE6. It went smoothly enough.

I installed IE7 and then did some searching for a stand alone Internet Explorer 6 so I could run both at the same time.

I found such a download at : http://browsers.evolt.org/?ie/32bit/standalone

When extracted I placed it in a folder in Program Files called Internet Explorer 6 and created a shortcut to it.

The bottom line is it works. The rendering part anyway. I can see what a site will look like in IE6 which was my aim but the settings are inherited from Internet Explorer 7 so some strange things happen with some sessions and plug-ins.

Overall I really really like Internet Explorer 7 and this time I think I'll stick with it. The installation was painless and all my add-ins and links etc held up aswell as ActiveX controls etc

The CSS is way way better and I am beginning to get used to the UI changes.

Screenshot Of IE6 and IE7 running together - click to enlarge

Screenshot Of IE6 and IE7 running together- click to enlarge

The conditional CSS hack used came from this page : http://www.brothercake.com/reference/ie7/xxx.html

Tags: IE7
Add to your del.icio.us    DIGG This!    Technorati Cosmos Link    Post to Reddit    Add to your Furl    Add to Blinklist
Comments [11] - Leave a comment
2006-10-20 01:41:00.0

Efficient MySQL database queries for pagination

Heres a nice little known gem of SQL to help with selecting limited amounts of records from a table. This can be used to pull paginated recordsets from a MySQL database efficiently.

Usually when I do pagination, I do a query on the database and limit the output using

The problem with this is that the whole query is executed and the results filtered out for you by ColdFusion.

I have only ever used the MySQL LIMIT clause with one parameter e.g : LIMIT 10 to return only 10 results but I didnt know you could tell it to start at a specific row and return the next 10 records.

So, the above can be cut down to:

which basically puts all the work on the database and tells it to fetch 10 records from the database starting at record 20.

The ORDER BY is important because the 20 is the row index so it will order the table first and then start at row 20.

A small tip but a valuable one none the less.

Tags: ColdFusion | MySQL | Tips
Add to your del.icio.us    DIGG This!    Technorati Cosmos Link    Post to Reddit    Add to your Furl    Add to Blinklist
Comments [6] - Leave a comment
2006-10-13 11:59:00.0

Pandoras Box Updated - Pandora API 2 Supported

Sometime in the wee hours of this morning, Pandora released a new version of the player which added a number of new features.

One of these features was the new Pandora Events API Version 2. This broke the way Pandoras Box retrieved the current song and artist. This is now resolved.

Also the Station Quick Mix is now supported.

I also took this release to add Pandoralicious Station Browsing facilities.

You also have the option of logging all songs you like to a text file to explore later.

There is one more nice fature in there but I'll post on this later.

If you are upgrading to a the latest version, I would recommend un-installing the last version completely before installing this version. If your lazy and you dont un-install you probably wont have any issues :-)

Thanks to all who donated to the PayPal beer fund. Very much appreciated! I you havent done so yet and you appreciate the application there is no time like the present ;-)

DOWNLOAD LATEST VERSION - V1.3.3

You can find out all about Pandoras Box and read about the initial version here :

Pandoras Box - System Tray Wrapper Application For Pandora

Thank you to everyone who contributed comments, suggestions and encouragement. As always donated beer money goes along way to encourage development so if you like and use Pandoras Box, please consider clicking the donate button :-)

Add to your del.icio.us    DIGG This!    Technorati Cosmos Link    Post to Reddit    Add to your Furl    Add to Blinklist
Comments [33] - Leave a comment