Note that the following does *not* cause a copy and *will* append to
the array in ACF:
<cfset arrayAppend(o.getNumbers(), "wha")>
<cfdump var="#aNumbers1#">
<cfset arrayAppend(o.getNumbers(), "wha")>
<cfdump var="#aNumbers2#">
Sean
--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
There are some decisions made in the history of CFML that are just
plain weird and shallow-copy-on-assignment of arrays is one of the
stranger ones. Railo's general approach is to take a more intuitive /
more performant approach in those situations but offer a setting for
compatibility.
Transfer ORM is affected by this particular decision and does things
that rely on array copying. That's unfortunate because
pass-by-reference semantics for arrays is much faster and, in most
cases, causes no compatibility problems at all.
> Cheers for the quick response. Got any thoughts about my custom tags
> posting from a bit earlier? ;-)
I looked at that but had no insight at the time (truth to tell, I'm on
vacation in Los Angeles right now - at a cat show - so I'm not really
"working"). Given my crazy travel situation over the next two weeks, I
may not get to a place where I can set up a test case for your custom
tags to analyze the problem so you may just be better off opening a
ticket in JIRA for Micha to look at...
ACF will simple ignore this settings, passby for argument is already
supported, returnpassby will follow soon.
What you of course can do as well (this is war acf does in fact) is
the following.
<cffunction ...>
<cfargument ...>
<cfreturn duplicate(arr)>
</cffunction>
/micha
2010/10/16, Sean Corfield <seanco...@gmail.com>: