- see footer for list info -<
On 16/10/06, Mark Smyth <[EMAIL PROTECTED]> wrote:
>- see footer for list info -< Just to rephrase "Since CFMX you can scope url variables to mimic scoped variables... which amazingly foxes isDefined() and opens up a nice big hole" to: It's a bug with isDefined() which has been introduced since they changed the codebase to java
Its not actually a bug - its the way isDefined() is supposed to function. IsDefined() will scan through almost every scope looking for a variable even if you give it a specific variable name and scope. If you tell it to check for "session.varname" it will look for session.varname, then variables.session.varname and so on until it does or doesn't find the variable you've specified. This is why you'll find people advocating structKeyExists(session,"varname") over IsDefined() for a speed increase. You could do this a bit in CF5, but in CFMX all the scopes became predefined structs, so you can always use StructKeyExists without having to first do a StructNew() for that scope. Incidently, doing <cfset session = structNew()> will actually create a variable called "session" in the variables scope. (or at least thats the way it is with "attributes"). Regards Stephen _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:-
- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -< - Lists hosted by www.Gradwell.com -< - CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
