ColdFusion is case-insensitive, and Flex MXML and ActionScript are very case-sensitive. For consistency’s sake, when ColdFusion variables are sent from ColdFusion to the Flash Player via Flash Remoting, names are converted to uppercase (that’s the default behavior, and it can be changed if needed). So, a structure member named FirstName will be named FIRSTNAME when it arrives on the Flash Player (and referring to it as FirstName in MXML or ActionScript won’t work).
But, you actually can force case to be maintained in structures, depending on how structure members are defined. Look at these two examples. The first won’t preserve case:
In this example, if the structure were returned to the Flash Player, the members would be named FIRSTNAME and LASTNAME.
Here’s another example, one that will indeed preserve case:
This example accomplishes the exact same result as the previous example, in that it creates a structure and defines two members. But in this example, structure member names will be preserved, and they would indeed be named FirstName and LastName when they arrive in the Flash Player.
Leave a Reply