What version of OpenBD are you using? Also what version of ACF are you
testing against?
OpenBD is taking "foo.bar" and using it as a string literal. Meaning
it's looking for a key akin to caller['foo.bar'] whereas in on ACF it
appears to translating the dot notation so you can access nested
structures in the caller scope. I do remember ACF back a while ago that
you couldn't do that at all. Meaning it operated the same way as OpenBD
does right now. I know the Ben Nadel filed a bug on that, but that was
before there was an mostly public bug tracker for ACF and I never heard
if Adobe actioned that that bug report.
To be honest, I not sold that the way that ACF operates on this is
exactly the correct way. Maybe somebody else on the steering committee
can comment.
By the way, the work around is to do this:
targetStruct = Evaluate("caller.#attributes.rtnVar#");
HTH,
.Peter
Allen Weng said the following on 03/31/2011 09:08 PM:
> I have the following modules, when I run mod1.cfm, it throws runtime
> exception caller[attributes.rtnVar] doesn't exist.
>
> it works in ACF, but this doesn't seem to be happening for me in
> OpenBD. Can someone confirm this for me?
>
> Thanks.
>
> Allen
> =============
> mod1.cfm :
>
> <CFSCRIPT>
> foo = StructNew();
> foo.bar = StructNew();
> foo.bar.id = 1;
> foo.bar.title = 'title1';
> foo.bar.desc = 'desc1';
> </CFSCRIPT>
>
> <CFMODULE TEMPLATE="mod2.cfm" rtnVar="foo.bar">
> <cfdump var="#foo#">
> =====================
> mod2.cfm :
>
> <cfscript>
> targetStruct = caller[attributes.rtnVar];
> targetStruct.name = 'name1';
> targetStruct.desc = 'desc2';
> </cfscript>
>
>
--
Peter J. Farrell
[email protected]
[email protected]
http://blog.maestropublishing.com
Identi.ca / Twitter: @maestrofjp
--
official tag/function reference: http://openbd.org/manual/
mailing list - http://groups.google.com/group/openbd?hl=en