-
1. Re: coldfusion.runtime.Array vs java.lang.Object
Owain North Jun 6, 2011 5:19 AM (in response to Owain North)And to save anyone looking yes it's already been logged as a bug with Adobe, I'm just asking to see if anyone knows any fixes other than using the old script syntax.
-
2. Re: coldfusion.runtime.Array vs java.lang.Object
Adam Cameron. Jun 6, 2011 5:51 AM (in response to Owain North)I can't test this in a CF9 environment as I don't have one here. However I can test the issue as raised in the bugtracker, and this might work for you:
<cfscript>
a = getComponentMetadata("path.to.some.component").functions;
writeOutput(a.getClass().getName() & "<br />");
a2 = createObject("java", "java.util.Arrays");
writeOutput(a2.getClass().getName() & "<br />");
a3 = a2.asList(a);
writeOutput(a3.getClass().getName() & "<br />");
a4 = createObject("java", "java.util.Vector").init(a3);
writeOutput(a4.getClass().getName() & "<br />");
</cfscript><cfdump var="#variables#">
I googled "java convert array to vector", and found this page: http://www.roseindia.net/java/collection/array-vector-collections.shtml, upon which I based the code above.
Can you test:
for (stFunction in a4){
/// some stuff here
}
?
--
Adam
-
3. Re: coldfusion.runtime.Array vs java.lang.Object
Owain North Jun 6, 2011 5:57 AM (in response to Adam Cameron.)Yup, that certainly works. However tidy it is not
Looks like I'll be doing the old style loops then. Shame really, this is what happens when you try and be clever and cutting-edge I guess...

