>What you're testing is whether there's a 'foo' field in some
>'test' scope
>somewhere.
Correct
structKeyExists is using scope escalation to find
>"test" in the
>form scope (after checking variables, and maybe URL).
Also correct
This is as you'd
>expect, because you're dereferencing a variable (test), and
>that behaves
>exactly as if you'd dereferenced it in any other context.
Still correct
If
>you want to
>test for the 'foo' field in the 'form.test' scope, you have to do
>structKeyExists(form.test, 'foo'), or if you were really
>looking for the
>variables scope, then structKeyExists(variables.test, 'foo').
Agreed.
Now please explain what it is that isDefined() does differently to
structKeyExists() with regard to looking in implicit scopes.
Your earlier post implied that it was behaving differently. The point of my
code was to show that it doesn't.
Spike
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- StructKeyExists() vs IsDefined() Damien McKenna
- RE: StructKeyExists() vs IsDefined() Barney Boisvert
- Re: StructKeyExists() vs IsDefined() Matt Robertson
- RE: StructKeyExists() vs IsDefined() Barney Boisvert
- RE: StructKeyExists() vs IsDefined() Spike
- RE: StructKeyExists() vs IsDefined() Barney Boisvert
- RE: StructKeyExists() vs IsDefin... Spike
- RE: StructKeyExists() vs IsD... Barney Boisvert
- RE: StructKeyExists() vs IsD... Spike
- Re: StructKeyExists() vs IsD... Sean Corfield
- RE: StructKeyExists() vs IsD... Spike
- Re: StructKeyExists() vs IsD... Sean Corfield
- Re: StructKeyExists() vs IsD... Simon Horwith
- RE: StructKeyExists() vs IsD... Barney Boisvert
- RE: StructKeyExists() vs IsD... Spike
- Re: StructKeyExists() vs IsD... Matt Robertson
- Re: StructKeyExists() vs IsD... Matt Robertson