RE: [BULK] Re: args arg collections

2008-04-21 Thread Leitch, Oblio
Yes, you get two dumps. However, you'll notice that the output from testMe2 dumps a structure of two keys, both containing undefined struct element. If you remove the cfargument from testMe2, the dumps are identical. My question is, why? -Original Message- From: Azadi Saryev

Re: [BULK] Re: args arg collections

2008-04-21 Thread Dominic Watson
ArgumentCollection passes named arguments; this is why the arguments are undefined (the 'one' argument is not supplied and the other argument is unnamed). I agree that the second argument being undefined is odd; not entirely sure why but I think the above is the jist of it. If you call the

Re: [BULK] Re: args arg collections

2008-04-21 Thread Dominic Watson
I should mention that the workaround will only work with simple values - which is somewhat of a downside. Dominic -- Blog it up: http://fusion.dominicwatson.co.uk ~| Adobe® ColdFusion® 8 software 8 is the most important and

RE: [BULK] Re: args arg collections

2008-04-21 Thread Leitch, Oblio
Actually, they *are* technically named; the keys in the structure are numeric. You can't evaluate 'struct.1', but you _can_ evaluate 'struct[1]'. Further, what I'm saying is you *can* pass arguments through using an argumentCollection attribute. What you *can't* do is name the arguments in the

Re: [BULK] Re: args arg collections

2008-04-21 Thread Dominic Watson
Yes, this is exactly as I said. The 'one' argument is undefined because it has not been passed to the function - that is clear enough. I also said that I wasn't 100% sure why the '1' argument was undefined but that I suspect that ColdFusion knows it is an unnamed argument even though it has

Re: [BULK] Re: args arg collections

2008-04-21 Thread Dominic Watson
I just realised what an eejit I was with my first solution (close but no cigar). The following 'TestMe' function will work when either named OR unnamed arguments are passed to it: cffunction name=testMe output=1 cfset var arg = cfset var argList = cfset var aKeys =