You can use Java HashMaps to create your own case-sensitive "struct". Try
this:

  <cfobject type="java" action="create" class="java.util.HashMap"
name="myStruct">

  <cfset myStruct.put( "a", 5 )>
  <cfset myStruct.put( "A", 10 )>

  <cfoutput>
  a = #myStruct.get( "a" )#<br>
  A = #myStruct.get( "A" )#
  </cfoutput>

Here's the API reference for java.util.HashMap:

  http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html

Vince Bonfanti
New Atlanta Communications, LLC
http://www.newatlanta.com

> -----Original Message-----
> From: Cedric Villat [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 21, 2005 7:14 PM
> To: CF-Talk
> Subject: Case-sensitive Struct keys
> 
> So I guess CF doesn't support case-sensitive keys in a 
> structure. For example, given the following code:
> 
> test = StructNew();
> test.a = 5;
> test.A = 10;
> 
> I would have hoped that 2 keys would have been made, "a" and 
> "A", but instead only 1 key is made, and has a value of 10. 
> Is there anyway to have CF use case-sensitive keys so that I 
> could do something like the above to get 2 keys?
> 
> Thanks,
> Cedric 
>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195855
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to