Also, if you have a variable (not a struct) named
capability_detail.capability_id
isDefined will return true, despite the fact that it's not a key in the
structure. StructKeyExists is better IMO.

On Thu, Jun 30, 2011 at 5:29 PM, Russ Michaels <r...@michaels.me.uk> wrote:

>
> As I said earlier, IsDefined() will search every single scope for a var
> with
> the name you you specify, StructKeyExists() will only look in the specified
> struct.
>
>
> On Thu, Jun 30, 2011 at 7:55 PM, Stephane Vantroyen <s...@emakina.com>
> wrote:
>
> >
> > Maybe a stupid question too, but why is it better to use
> structkeyexists()
> > than isdefined() ? Both will check if the given variable exists right? I
> > don't get it, is it bound to performance or so?
> >
> >
> >
> > >I thought of that, but then wasn't sure how that would behave
> > >if capability_detail was a query.
> > >
> > >On Thu, Jun 30, 2011 at 12:11 PM, Andrew Scott <andr...@andyscott.id.au
> > >wrote:
> > >
> > >>
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346009
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to