Specifications

30 Migrating ColdFusion 5 Applications
Incompatible example
The following example to retrieve ColdFusion mappings throws an error because
ColdFusion MX does not store ColdFusion mappings in the registry.
<cfregistry action = "get"
branch = "HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\
Templates"
entry = "/cfdao/" type = "String" variable = "RegValue">
<cfif isdefined("regvalue")>
<cfset request.cfdao_mappeddir = "#regvalue#">
<cfelse>
<cfoutput>
Please create a CF Mapping named cfdao which points to your cfdao files before
trying to run this template.
</cfoutput>
<cfabort>
</cfif>
<cfinclude template = "/cfdao/dao_application.cfm">
Compatible example
To work around this, you can include error handling in your templates that would notify
the system administrator if a
cfinclude failed due to a missing mapping. In the event of
a missing mapping, the system administrator must create it in the ColdFusion
Administrator.
For more information on performing registry operations in ColdFusion MX, see
cfregistry in the CFML Reference.
Using ListSort() in ColdFusion MX
When sorting with textnocase in a descending order, ColdFusion 5 and ColdFusion
MX return the results in a different order. However, both are correct because in a
textnocase sort, “apple” is equal to “APPLE”.
In ColdFusion MX, a descending
textnocase sort returns the elements in the exact
reverse order as in an ascending
textnocase sort. This is different than in ColdFusion 5.
The following code produces different results in ColdFusion MX than in ColdFusion 5:
<cfset list = "orange,Orange,apple">
<cfset listAsc = ListSort(#list#, "textnocase", "asc")>
<cfset listDesc = ListSort(l#list#, "textnocase", "desc")>
<cfdump var = #listAsc#>
<cfdump var = #listDesc#>
This code produces the following results for ascending and descending sort operations in
ColdFusion 5 and ColdFusion MX:
For more information, see
ListSort() in CFML Reference.
Sort order ColdFusion 5 results ColdFusion MX results
Ascending (listAsc) apple, orange,Orange apple,orange,Orange
Descending (listDesc) orange, Orange, apple Orange,orange,apple