-
1. Re: Creating structures
CF-AXL Jun 21, 2012 1:10 AM (in response to Community Help)These are valid statements.
<cfset myStruct = {structKey1 = {innerStructKey1 = "innerStructValue1"}}>
<cfset myStruct={structKey1.innerStructKey1 = "innerStructValue1"}>
A closing angle bracket (>) is missing in
<cfset innerStruct1 = {innerStructKey1 = "innerStructValue1"}
An extra quotation in front of "Adobe Systems Incorporated" in
<cfset "#i#"={name = ""Adobe Systems Incorporated"}>
This is also a valid statement.
<cfset "#i#"={name = "Adobe Systems Incorporated"}>
-
2. Re: Creating structures
Charlie Arehart Oct 20, 2012 4:14 PM (in response to Community Help)This section should be updated to reflect the new support for colon ( notation for defining structure keys as key:value pairs.
So for the example above showing:
that could now be done in CF10 as:
<cfset coInfo=>
(BTW, the example which I've quoted is actually missing a closing bracket in the text above.)
-
3. Re: Creating structures
Charlie Arehart Oct 20, 2012 4:19 PM (in response to Charlie Arehart)Ugg: it seems that the editor used for comments here does not permit use of tags. That's really lamentable.
I will repeat here the two lines of code I was offering, without any brackets this time:
Old way:
cfset coInfo={name="Adobe Systems Incorporated", industry="software"}
New way:
cfset coInfo=
(BTW, it's curious that while the first line disappeared entirely when my first comment is displayed, the second line appears partially. So it's not really that ALL tag using brackets disappears, but all of some lines, and some of other lines. Either way, it would be helpful if this web page editor, used for entering comments on a tag-based language like CFML, was able to handle displaying any code entered here.)
-
4. Re: Creating structures
Charlie Arehart Oct 20, 2012 4:22 PM (in response to Charlie Arehart)Wow, even colons seem to cause problems, so that the "new way" line still is botched. Put it this way, reader: you can replace the = within the curly braces with a colon (:). It seems that the editor doesn't like when a colon is used with curly braces. Go figure!
-
5. Re: Creating structures
Aaron Neff Oct 21, 2012 1:32 AM (in response to Charlie Arehart)Hi Charlie,
I learned by chance that we can find our post in the forums, then edit the post, and fix the brackets there. That particular edit box doesn't have this issue.
I agree that the comment box on the docs pages is frustrating. I wish Adobe would fix it.
Thanks,
-Aaron



