If variables.myField doesn't exist, then it'll search
form.variables.myField, or possibly form["variables.myField"], maybe even
both. Same goes for url, and maybe even variables
(variables.variables.myField). You'd have to write a little test to be
sure, but isDefined is definitely doing a LOT more work than
structKeyExists().
Cheers,
barneyb
> -----Original Message-----
> From: Matt Robertson [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 12, 2004 1:03 PM
> To: CF-Talk
> Subject: Re: StructKeyExists() vs IsDefined()
>
> Barney wrote:
> >isDefined(), on the other hand, looks in all the potential places
> > that the variable can exist. So it'll check the variable
> as named, and then
> > for a variable with that name in all the implicit scopes.
>
> What if you define the var explicitly?
>
> if (isdefined("variables.myField")) { variables.yadda=yaddayadda; }
>
[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