Rip's Domain

CF 8 HotFix 2 wish list.

Posted in ColdFusion by rip747 on October 6, 2007

Wouldn’t it be great if Adobe could fix some of the annoying outstanding bugs in the next hotfix that we as a community really need. What would you like them to fix?

For me I really want them to fix the new array and structure syntax. I personally think it’s great that you can create an array like so:

<cfset s = [1,2,3,4] >

and structures like so:

<cfset s = {a=1, b=2, c=3, d=4}>

The problem is that you can’t combine the two like so:

<cfset s = [1,2,3,4, {a=1, b=2, c=3, d=4}] >

Please Adobe, fix this in the next hotfix!


3 Responses

Subscribe to comments with RSS.

  1. Dan G. Switzer, II said, on October 6, 2007 at 9:42 pm

    I’d love to see this addressed as well. In the meantime I use some custom UDFs I wrote (arrayCreate() and structCreate()) which essentially do the same thing–but do allow for deep nesting.

    s = arrayCreate(1, 2, 3, 4, structCreate(a=1, b=2, c=3, d=4));

    The sad part is these UDFs are very simple functions that use the arguments scope to return the correct datatype.

    This should be an easy problem for them to fix.

  2. zac spitzer said, on October 6, 2007 at 11:07 pm

    Better error trapping and reporting in nested statements for chained statements.

    I usually split all my code into single statements when working in cfscript with lots a cfc’s, otherwise, if an error occurs the error message is often pointing in slightly the wrong direction.

  3. Paul Marcotte said, on October 7, 2007 at 6:49 pm

    Hi Tony,

    You could try using json data format as a workaround. Something like:

    <cfsavecontent variable=”myComplexArray”>

    When deserialized, jsondata becomes a struct and “s” is a key within it whose value is an array in the format you are seeking. What’s nice is that you can deserialize and access the value one step using dot syntax.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: