One of the techniques that we use to take the case sensitivity out of
the picture is to utilize a "helper" function in our CFC's and then
wrap our cfreturn variables with one of the helper functions. Then all
our references in Flex are always - all lowercase.

For example, say you have a function that will be returning a
structure:

<cffunction name="whatever" access="remote" returntype="struct">
  <!--- your desired query --->
  <cfreturn lowerCaseStruct(your_query_results) />
</cffunction>

We include the following "helper" function at the bottom of the CFC in
question:
        
<cffunction name="lowerCaseStruct" access="private"
returntype="struct">
  <cfargument name="myStruct" type="struct" required="yes">
  <cfscript>
    var myKeyList = StructKeyList(arguments.myStruct);
    var i = "";
    var newStruct = StructNew();
    for (i=1; i LTE ListLen(myKeyList); i=i+1) {
      nKey = listgetat(myKeyList, i);
      structInsert(newStruct, LCase(nKey), arguments.myStruct[nKey]);
    }
  </cfscript>
  <cfreturn NewStruct>
</cffunction>




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to