StructKeyArray - Case in Structure Keys

Posted by: scoopseven 16 years, 7 months ago

I looked for a long time for a solution to be able to loop over the names of the arguments passed into a cfc. I searched for things like "loop over arguments structure" and "argument scope coldfusion". Finally I found this tag. Sweet! Not so sweet. CF converts all structure keys to uppercase. In order to preserve the case of a key you have to do set the structure like strFoo["Foo1"] = "jedi"; then the returned key will be Foo1 If you reference the structure like strFoo = StructNew(); strFoo.Foo1 = "jedi"; then the key will always be reported as FOO1 However, since I'm dealing with arguments passed in to a function, there's no way for me to explicitly declare them. Stay tuned.

Currently unrated


Recent Tweets

Recent Posts

Archive

2013
2012
2011
2010
2009
2008
2007
2006

Categories

Authors

Feeds

RSS / Atom