Friday, October 10, 2008    
Home My Books Blog ColdFusion About Me Back    

Calendar
<< May 2008 >>
S M T W T F S
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
             

Search

Categories
 • Acrobat (2) [RSS]
 • Adobe (68) [RSS]
 • AdobeMAX06 (45) [RSS]
 • AdobeMAX07 (59) [RSS]
 • AdobeMAX08 (25) [RSS]
 • AIR (134) [RSS]
 • Appearances (122) [RSS]
 • Books (69) [RSS]
 • CFEclipse (14) [RSS]
 • ColdFusion (1154) [RSS]
 • Data Services (13) [RSS]
 • Fish Tank (2) [RSS]
 • Flash (106) [RSS]
 • Flex (372) [RSS]
 • Home Automation (3) [RSS]
 • Jobs (96) [RSS]
 • JRun (13) [RSS]
 • Labs (27) [RSS]
 • LiveCycle (22) [RSS]
 • MAX (160) [RSS]
 • Regular Expressions (13) [RSS]
 • RIA (11) [RSS]
 • SQL (38) [RSS]
 • Stuff (505) [RSS]
 • Tips (CF Studio) (80) [RSS]
 • Tips (CF) (795) [RSS]
 • Tips (Dreamweaver) (91) [RSS]
 • Tips (Flex Builder) (2) [RSS]
 • Using CF (137) [RSS]
 • Wireless (99) [RSS]

Other BLOGs
 • Charlie Arehart
 • Lee Brimelow
 • Ray Camden
 • Christophe Coenraets
 • Sean Corfield
 • Mihai Corlan
 • Cornel Creanga
 • John Dowdell
 • Danny Dura
 • Enrique Duvos
 • Steven Erat
 • Kevin Hoyt
 • Serge Jespers
 • Adam Lehman
 • Duane Nickull
 • Miti Pricope
 • Andrew Shorten
 • Ryan Stewart
 • James Ward
 • Greg Wilson
 • Full As A Goog

RSS Feeds
 • Feed
 • Subscribe

Join my mailing list and find out about new books and other topics of interest.

Thoughts, ideas, tips, musings, and pontifications (not necessarily in that order) by Ben Forta ...
NOTE: This is my personal blog, and the opinions and statements voiced here are my own.

Viewing By Day : May 7, 2008 / Main
May 7, 2008

Check Out ColdBricks, A ColdFusion Based Open Source CMS

ColdBricks is a ColdFusion based CMS and site generator, and it's free and open-source. There's a very impressive live demo online, too. This one via fellow evangelist Serge Jespers.


Preserving ColdFusion Structure Member Case In Flex

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:

<cfset user=StructNew()>
<cfset user.FirstName="Ben">
<cfset user.LastName="Forta">

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:

<cfset user=StructNew()>
<cfset user["FirstName"]="Ben">
<cfset user["LastName"]="Forta">

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.

  © Copyright 1997-2008 Ben Forta, All Rights Reserved