I think he's talking about the 'arguments' scope in particular, as it
has weird quirks that aren't exhibited by any other CF scopes (i.e.
the ability to dereference like an array). StructKeyExists is still
the proper way to test for an optional argument; in that sense
treating arguments like a struct is the proper thing to do. Just
don't necessarily expect it to ALWAYS behave exactly like a "real"
struct.
cheers,
barneyb
On 6/21/05, Dave Carabetta <[EMAIL PROTECTED]> wrote:
> On 6/21/05, Sean Corfield <[EMAIL PROTECTED]> wrote:
> > On 6/21/05, Peter J. Farrell <[EMAIL PROTECTED]> wrote:
> > > Wow, that's really interesting - on MX7 why does the a dump only have
> > > two arguments in it, but the structCount is 3?
> >
> > Well, you need to remember that arguments is a scope, not a true
> > struct and it is kinda magic because it can be accessed as both an
> > array and a struct in some circumstances. Trying to treat it as a pure
> > struct (or a pure array) is likely to bite you...
>
> Not to take this off-topic, but then why do you advocate using
> structKeyExists(form, "myValue") rather than isDefined("form.myValue")
> if you suggest not treating the reserved scopes like a pure struct? I
> understand the multiple scope chain lookup argument when using
> isDefined() and how it's potentially much slower (and I personally use
> structKeyExists() everywhere for scope lookups), but what you wrote
> above sounds slightly contradictory to what you've advocated
> elsewhere:
>
> http://www.corfield.org/blog/index.cfm?do=blog.entry&entry=E0816B26-E1FF-6FFD-CF66F9050F993E12
>
> Regards,
> Dave.
>
--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/
Got Gmail? I have 50 invites.
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]