I also just tried StructKeyArray(arguments) and
StructKeyList(arguments). Both foo and bar show up there, though
StructKeyExists(arguments, 'bar') is false. That just feels like a
contradiction in the language implementation.

On Tue, Apr 15, 2008 at 6:52 AM, Matt Williams <[EMAIL PROTECTED]> wrote:
> On Mon, Apr 14, 2008 at 11:35 PM, Sean Corfield <[EMAIL PROTECTED]> wrote:
>  >
>  >  On Mon, Apr 14, 2008 at 6:40 PM, Matt Williams <[EMAIL PROTECTED]> wrote:
>  >  >  This seems strange to me, but perhaps it is expected behavior. If you
>  >  >  have a function that has an argument with required="false" and in that
>  >  >  function you loop over collection="#arguments#", the loop includes
>  >  >  that argument.
>  >
>  >  Correct. You declared the argument, therefore it is present in the
>  >  collection. If you use structKeyExists() or isDefined() you'll see it
>  >  is not present by those tests.
>
>  Am I the only one that finds it odd that cfloop
>  collection="#arguments#" includes a key that structKeyExists() yields
>  false? It feels strange to have to test if something exists inside a
>  loop that should only include items that exist. If "it is present in
>  the collection" as you say, then shouldn't structKeyExists() equal
>  true?
>
>  But if that's how the language works, then knowing that I can program
>  as I need to so that it will work. I'll get over it eventually.
>
>  Thanks.
>
>
> --
>  Matt Williams
>  "It's the question that drives us."
>



-- 
Matt Williams
"It's the question that drives us."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to