|
Finding the system file storage in AIR |
When progamming an AIR application, you may want to make use of the applicationStorageDirectory available via the flash.filesystem package to store temporary files/folders. You can find where your system is storing these files by doing something like the following:
2trace(f.nativePath + ' is where my file is stored');
This will give you an absolute path to the local system file storage location. Handy for multi platform applications, as Pc and MAC based systems will use different default storage directories.
|
Coldfusion 9 to integrate with Microsoft office, Open Office and SharePoint |
Adobe keeps 'leaking' sneaky bits of information about the next platform release for Coldfusion Server, Version 9.
The latest release info is that it will be out of the box compatible with both Microsoft Office, and Open Office. This means that you will be able to read, write and create office documents from a coldfusion application.
Hand in hand with this is the new ability to talk directly to office documents is a new API for interfacing directly into SharePoint server, and update data directly. This is an interesting development for the ColdFusion community, as there really isn't any bespoke .Net functionality left that CF can't handle after this.
|
Upgrading Blog CFC from 5.8.001 to 5.9.3.006 |
I've been having the odd database login problem, and RSS feed issue when this site gets spidered by search bots. I can't really give my web host much grief about it as I don't know if either of these issues have been fixed in newer releases of Blog CFC.
So last night I set about upgrading to the newest release. Now like most developers I rarely find that an application does exactly what I want out of the box, so I had modified several small areas of the installation to suit my needs. This left me with the dilemma of not being able to just copy the new code over the top.
There is a tool I have used in the past called Beyond Compare from Scooter software http://www.scootersoftware.com/. It is a file and folder comparison tool that allows you to enter individual files and resolve potential conflicts at line level if need be.
After an hour or so of running through the newest release of Blog CFC, which you can get here, http://blogcfc.riaforge.org/ I had merged in all the new change sets into my base code, and run the database scripts and bingo! I was up-to-date. Far more easily done than I would have thought.
My only gripe is that he wrote SQL change scripts for mySQL rather than MSSQL, but then that's just personal preference.
It would be nice to have an entirely separate skinning module, that way you could just replace code bases, but if you are running your Blog then chances are you can deal with that.
|
Cfscript looping over lists |
I really like cfscript, but as with any skill I don't use it often in my current role (its not 'standard') so I find that my knowledge of it is on the wane.
I do develop extensively outside of a working environment, so I find myself deliberately writing cfscript code rather than 'normal' coldfusion. I think it is because it is more like javascript, actionScript or .Net, I like the script formatting.
So I find myself looping over a series of lists in a form action template, I thought I would experiment with the different ways of doing the loop, cfscript and non script. So I create a simple list.
Now loop over it in the traditional way.
2 <cfloop from="1" to="#listLen(variables.myList)#" index="L">
3 #ListGetAt(variables.myList, L)#<br/>
4 </cfloop>
5</cfoutput>
And now the cfscript way.
2 For (i=1;i LTE ListLen(variables.myList); i=i+1)
3 writeoutput(ListGetAt(variables.myList, i)&'<BR>');
4</cfscript>
Both code blocks give the same output, I much prefer the code style of the second block though.