G'day Mat
I hate to be a fly in the ointment, but you're quite wrong with most of
what you say about isDefined() in your preceding post.

> isdefined(session.crap) will return true

It will error.  If your double-quote key is missing and you actually
mean isdefined("session.crap") (which is a different, but valid
construct), it will return false.

> isdefined(crap) should be true

Again, it'll error or it'll be false, depending on whether you meant it
to have quotes.  isDefined() does NOT inspect the session scope unless
you ask it to (by specifying it).

<blockquote>
where as isdefined("
session.crap) could find an incorrect variable
You can see there is a diff if you have 2 vars

session.session.crap
and
session.session.session.crap
in the one page.
</blockquote>

No it won't.  Because isDefined("session.crap") will find neither of
those.  It's not quite *that* stupid as a function.

Are you sure you're not thinking of structFindKey(), which DOES behave
kinda along the lines you're suggesting?

What isDefined() WILL do that could either suck or be "actually we
meant it to be that way" depending on whether you either "use CF for a
living" or "work for Adobe", is that isDefined("foo") will return true
if there's a key "foo" in any of the scopes mentioned here:
http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000914.htm

However not for the session scope.

This can lead to unexpected behaviour.  Well: if one's paying
attention, it shouldn't be unexpected, I guess.  Or one could always
scope one's variables, in which case it's a non-issue.

-- 
Adam


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

Reply via email to