The only time I had a problem using isDefined is when I forgot to use
quotation marks around the variable.  The other thing is I don't think
isdefined works well on structs, you have to use StructKeyExists. 

-----Original Message-----
From: C Frederic Valone [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 23, 2001 1:48 PM
To: CF-Talk
Subject: Re: "isdefined" obsolete?


If you see my previous response you'll see I tried all forms of syntax...
even those I "knew" were incorrect.... as stated the
problem was not logical so I tried illogical solutions as well.
This happened I would say two years or more ago... so I doubt very much I
was using 4.5.1 as it hadn't been released...I only
mentioned the whole issue as an FYI. I see it did happen for someone else on
the list as well.
Frederic

Philip Arnold - ASP wrote:
> 
> > Sorry to contadict you Adrian, but I can say with complete conviction
> > (and no explanation at all) that these experiences did happen...I
> > know that obviously a variable either exists or doesn't. That
> > doesn't mean that in every instance a function will work though.
> > I replaced the  isdefined function (after checking to be sure the
> > syntax was correct) with parameterexists and it worked. I
> > switched it back to isdefined and it did not. I did it in more than one
> > instance and I confirmed the issue and verified the results of
> > the workaround with other cf programmers on site.
> 
> As long as the quotes are around the variable name, then it will work -
> unless you're running a not-upgraded version of CF (4.0 or 4.5 rather than
> 4.0.1 and 4.5.1 SP2)
> 
> I've never had a problem with isDefined(), and it's much easier to use
than
> ParameterExists(), especially if you're using dynamic names
> 
> isDefined("form.#i#") is easier than Evaluate("ParameterExists(form.#i#)")
> for obvious reasons although both should work exactly the same
> 
> Philip Arnold
> Director
> Certified ColdFusion Developer
> ASP Multimedia Limited
> T: +44 (0)20 8680 1133
> 
> "Websites for the real world"
> 
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> **********************************************************************
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to