<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc = "http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/">
	<channel rdf:about="http://livedocs.adobe.com/">
	<title>LiveDocs Comments - coldfusion - 6.1 - htmldocs - funct130.htm</title>	
		<link>http://livedocs.adobe.com/</link>
		<description>Macromedia LiveDocs - online documentation with user feedback.</description>
		<copyright>Copyright 2009, Macromedia, Inc.</copyright>
		<dc:date>2009-11-25T16:43:36</dc:date>
		<dc:language>en-us</dc:language>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#39839" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#39761" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#38894" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#28315" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#26682" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#24346" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#21176" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#20481" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#20439" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#19387" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#16698" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#7624" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#7490" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#3910" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#3901" />
			</rdf:Seq>
		</items>
	</channel>
	
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#39839">
		<title>coldfusion/6.1/htmldocs/funct130.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#39839</link>
		<description>@ no screen name [sep 21]:&lt;br /&gt;For your information; I get the following output when I click 'reject':&lt;br /&gt;&lt;br /&gt;works when manual reject is pressed &lt;br /&gt;DOES NOT work with manual reject is pressed</description>
		<dc:creator>guessed</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-09-23T01:31:50</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#39761">
		<title>coldfusion/6.1/htmldocs/funct130.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#39761</link>
		<description>I just ran into a problem using isDefined().  i just upgraded to 6.1 last week for another bug that was causing me problems.  Now this is coming up.  But not everythere.&lt;br /&gt;&lt;br /&gt;&lt;form action=&quot;&quot; method=&quot;post&quot;&gt;&lt;br /&gt;	&lt;input name=&quot;manual_accept&quot; type=&quot;image&quot; src=&quot;button_accept.gif&quot; border=&quot;0&quot;&gt;&lt;br /&gt;	&lt;input name=&quot;manual_reject&quot; type=&quot;image&quot; src=&quot;button_reject.gif&quot; border=&quot;0&quot;&gt;&lt;br /&gt;&lt;/form&gt;&lt;br /&gt;&lt;br /&gt;&lt;cfif isDefined(&quot;form.manual_reject.x&quot;)&gt;&lt;br /&gt;	works when manual reject is pressed&lt;br /&gt;&lt;/cfif&gt;&lt;br /&gt;&lt;cfif isDefined(&quot;manual_reject.x&quot;)&gt;&lt;br /&gt;	DOES NOT work with manual reject is pressed&lt;br /&gt;&lt;/cfif&gt;&lt;br /&gt;&lt;br /&gt;&lt;cfif isDefined(&quot;manual_accept.x&quot;)&gt;&lt;br /&gt;	works when manual accept is pressed&lt;br /&gt;&lt;/cfif&gt;&lt;br /&gt;&lt;br /&gt;I have isDefined() all through out my application without for form scope.  Is this a new bug for Cold Fusion?</description>
		<dc:creator></dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-09-21T11:47:29</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#38894">
		<title>coldfusion/6.1/htmldocs/funct130.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#38894</link>
		<description>Here is a scoping problem that was driving me crazy until i figured out what's going on.  I've defined a function that had url as one of it's arguments names&lt;br /&gt;&lt;cfargument name=&quot;url&quot; required=&quot;true&quot; type=&quot;string&quot;&gt;&lt;br /&gt;within the function i was testing for existiance of a url parameter as usual&lt;br /&gt;&lt;cfif isDefined(&quot;url.foo&quot;)&gt;&lt;br /&gt;However, this always returns FALSE since CF6.1 is looking at the function arguments scope first and since arguments.url is a string it returns always false no matter what the url query string is.  Whether this is a feature or a bug is debatable but is sure confusing.  So watch out.</description>
		<dc:creator>dorange</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-08-23T14:25:17</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#28315">
		<title>coldfusion/6.1/htmldocs/funct130.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#28315</link>
		<description>to unset a variable, use structdelete on the &quot;variables&quot; structure.&lt;br /&gt;&lt;br /&gt;eg. &lt;br /&gt;	&lt;cfscript&gt;&lt;br /&gt;		thisone = &quot;ok&quot;;&lt;br /&gt;		writeoutput(&quot;&lt;div&gt;#isdefined('thisone')#&lt;/div&gt;&quot;);&lt;br /&gt;		structdelete(variables,&quot;thisone&quot;);&lt;br /&gt;		writeoutput(&quot;&lt;div&gt;#isdefined('thisone')#&lt;/div&gt;&quot;);&lt;br /&gt;	&lt;/cfscript&gt;</description>
		<dc:creator>mocax</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-02-21T18:31:44</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#26682">
		<title>coldfusion/6.1/htmldocs/funct130.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#26682</link>
		<description>IsDefined(&quot;myArray[3]&quot;) does not return &quot;false&quot; it produces an error.  Tested in CF 5, mx, mx 6.1.  You can not check for the existence of an array element, by copying the element to a simple variable and use IsDefined to test whether the simple variable exists, because you get a  error trying to use the array to set the simple variable. &lt;br /&gt;here is a helpful udf with example you may use until CF can handle this requirement.&lt;br /&gt;&lt;br /&gt;&lt;cfscript&gt;&lt;br /&gt;    function isArrayElementDefined(arrayName){&lt;br /&gt;        try{&lt;br /&gt;            testArrayVal = evaluate(arrayName);&lt;br /&gt;            return true;&lt;br /&gt;        }catch(any testForArrayElement){&lt;br /&gt;            return false;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/cfscript&gt;&lt;br /&gt;&lt;cfset myArray = arrayNew(1)&gt;&lt;br /&gt;&lt;cfset myArray[1] = &quot;bob&quot;&gt;&lt;br /&gt;&lt;cfset myArray[3] = &quot;joe&quot;&gt;&lt;br /&gt;&lt;cfoutput&gt;&lt;br /&gt;  &lt;cfloop from = &quot;1&quot; to = &quot;3&quot; index = &quot;place&quot;&gt;&lt;br /&gt;    #isArrayElementDefined(&quot;myArray[#place#]&quot;)#&lt;br /&gt;  &lt;/cfloop&gt;&lt;br /&gt;&lt;/cfoutput&gt;&lt;br /&gt;&lt;br /&gt;output: true false true</description>
		<dc:creator>cannedRadio</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-01-18T11:07:16</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#24346">
		<title>coldfusion/6.1/htmldocs/funct130.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#24346</link>
		<description>the following code:&lt;br /&gt;&lt;br /&gt;&lt; cfif isDefined(&quot;Session.MM_Username&quot;)&gt;&lt;br /&gt;&lt; a href &quot;logout.cfm&quot;&gt;Click here to log out&lt;/a&gt;&lt;br /&gt;&lt;cfoutput&gt;#Session.MM_Username#&lt;/cfoutput&gt;&lt;br /&gt;&lt;cfelse&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;/cfif&gt;&lt;br /&gt;&lt;br /&gt;will return the logout link and a blank as the Session.MM_Username regardless to whether or not the Session.MM_Username is defined...&lt;br /&gt;&lt;br /&gt;Otherwise&lt;br /&gt;&lt;br /&gt;&lt; cfif isDefined(Session.MM_Username)&gt;&lt;br /&gt;&lt; a href &quot;logout.cfm&quot;&gt;Click here to log out&lt;/a&gt;&lt;br /&gt;&lt;cfoutput&gt;#Session.MM_Username#&lt;/cfoutput&gt;&lt;br /&gt;&lt;cfelse&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;/cfif&gt;&lt;br /&gt;&lt;br /&gt;returns the error &quot;Session.MM_Username is NOT defined&quot; which is what I'm testing for, right ? &lt;br /&gt;&lt;br /&gt;Conditional statements shouldn't be this confusing</description>
		<dc:creator>infamouskirch</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2004-11-22T16:00:05</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#21176">
		<title>coldfusion/6.1/htmldocs/funct130.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#21176</link>
		<description>Following code throws an error after it outputs the variable...?&lt;br /&gt;&lt;br /&gt;Error: Parameter 1 of function IsDefined, which is now &quot;tempStructure.tempArray[1]&quot;, must be a syntactically valid variable name.&lt;br /&gt;&lt;br /&gt;&lt;cfset tempStructure = structNew()&gt;&lt;br /&gt;&lt;cfset structInsert( tempStructure, &quot;tempArray&quot;, arrayNew( 1 ) )&gt;&lt;br /&gt;&lt;cfset arrayPrepend( tempStructure.tempArray, &quot;tempValue&quot; )&gt;&lt;br /&gt;&lt;cfoutput&gt;#tempStructure.tempArray[1]#&lt;/cfoutput&gt;&lt;br /&gt;&lt;cfif isDefined( &quot;tempStructure.tempArray[1]&quot; )&gt;&lt;br /&gt;	tempStructure.tempArray[1] exists&lt;br /&gt;&lt;/cfif&gt;</description>
		<dc:creator>ChronoCrypt</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2004-09-09T12:15:12</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#20481">
		<title>coldfusion/6.1/htmldocs/funct130.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#20481</link>
		<description>The only thing I can think of is to put the variable in a structure and use the StructDelete function to delete it.</description>
		<dc:creator>jrunrandy</dc:creator>
		<dc:type>1 1</dc:type>
		<dc:date>2004-08-25T09:44:40</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#20439">
		<title>coldfusion/6.1/htmldocs/funct130.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#20439</link>
		<description>Is there no way to &quot;undefine&quot; or unset a simple variable once it has been defined?</description>
		<dc:creator>Glowball</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2004-08-24T09:04:18</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#19387">
		<title>coldfusion/6.1/htmldocs/funct130.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#19387</link>
		<description>I'm playing with IsDefined and not getting the results that the CF5 language ref says I would get. IE:&lt;br /&gt;&lt;br /&gt;&lt;cfset andy = &quot;matthews&quot;&gt;&lt;br /&gt;&lt;cfoutput&gt;&lt;br /&gt;IsDefined quotes: #IsDefined(andy)#&lt;br&gt;&lt;br /&gt;&lt;/cfoutput&gt;&lt;br /&gt;&lt;br /&gt;The book says that without quotes around a var, IsDefined checks to see if the contents of a variable exist rather than the variable itself. You can see that the var has contents, but when I run the code above, I get &quot;NO&quot;, insted of YES. Any thoughts?</description>
		<dc:creator>mydognacho</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2004-08-03T11:26:11</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#16698">
		<title>coldfusion/6.1/htmldocs/funct130.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#16698</link>
		<description>I'm trying to test whether an application-scoped variable is defined by using the following code:&lt;br /&gt;&lt;br /&gt;(1) &lt;cfif IsDefined(&quot;application.departmentName&quot;)&gt;...&lt;br /&gt;&lt;br /&gt;However, when I run this code, I get the following error: &quot;The requested scope application has not been enabled&quot;, i.e. no, the variable is not defined.  It's not clear to me why the function would throw an error versus returning false (which I would think would be the logical thing to do) if the application scope has not been enabled.  Anyway, what is the proper way for testing the above condition?&lt;br /&gt;&lt;br /&gt;(2) &lt;cfif StructKeyExists(application, &quot;departmentName&quot;)&gt;...?&lt;br /&gt;Is this the correct way?  If anything, I would think it would be more logical if this code in (2) threw an error (as opposed to the code in (1)).&lt;br /&gt;&lt;br /&gt;(3) &lt;cfif IsDefined(&quot;application&quot;) and StructKeyExists(application, &quot;departmentName&quot;)&gt;...?&lt;br /&gt;Is this the correct way?  (1) makes the most sense to me...&lt;br /&gt;&lt;br /&gt;Thanks</description>
		<dc:creator>yflicker</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2004-06-12T15:58:52</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#7624">
		<title>coldfusion/6.1/htmldocs/funct130.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#7624</link>
		<description>You can use either of the following ways to determine whether a dynamically named key exists:&lt;br&gt;Use the &amp; string concatenation operator to add the key name in IsDefined, as in IsDefined(&quot;myStruct.&quot;&amp;keyVar).&lt;br&gt;Use the StructKeyExists function with the variable name as the key parameter.&lt;br&gt;The following code shows both:&lt;br&gt;&lt;br&gt;&lt;cfset var1=&quot;foo&quot;&gt;&lt;br&gt;&lt;cfset var2=&quot;bar&quot;&gt;&lt;br&gt;&lt;cfset Mystruct.foo=&quot;Hello World&quot;&gt;&lt;br&gt;&lt;cfoutput&gt;&lt;br&gt;#structkeyExists(mystruct, var1)#&lt;br&gt;&lt;br&gt;#structkeyExists(mystruct, var2)#&lt;br&gt;&lt;br&gt;#Isdefined(&quot;Mystruct.&quot;&amp;var1)#&lt;br&gt;&lt;br&gt;#Isdefined(&quot;Mystruct.&quot;&amp;var2)#&lt;br&gt;&lt;/cfoutput&gt;</description>
		<dc:creator>halL</dc:creator>
		<dc:type>1 1</dc:type>
		<dc:date>2004-02-09T06:17:46</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#7490">
		<title>coldfusion/6.1/htmldocs/funct130.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#7490</link>
		<description>It doesn't appear my last comment posted.&lt;br /&gt;&lt;br /&gt;IsDefined does not work, nor does it appear there is any other way to check for the value of a member of a struct, if you're referencing it using a variable member name.&lt;br /&gt;&lt;br /&gt;For example, if you are looping like this:&lt;br /&gt;&lt;cfloop LIST=&quot;#NewKeys#&quot; DELIMITERS=&quot;,&quot; INDEX=&quot;val&quot;&gt;&lt;br /&gt;IsDefined( &quot;stOrig.#val#&quot; ) does not work&lt;br /&gt;IsDefined( &quot;stOrig.val&quot; ) does not work&lt;br /&gt;IsDefined( &quot;stOrig.[val]&quot; ) does not work&lt;br /&gt;StructFindKey cannot be used&lt;br /&gt;StructKeyExists only checks for the existence of the key, not the value.&lt;br /&gt;&lt;br /&gt;The problem occurs when you try and perform any type of comparison between two values inside of the loop:&lt;br /&gt;&lt;CFIF stOrig[val] NEQ stUser[val]&gt;</description>
		<dc:creator>Corey Gilmore</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2004-02-06T15:22:57</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#3910">
		<title>coldfusion/6.1/htmldocs/funct130.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#3910</link>
		<description>The behavior mentioned above is documented at&lt;br /&gt;&lt;a href=&quot;http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/expres33.htm&quot;&gt;http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/expres33.htm&lt;/a&gt;</description>
		<dc:creator>Corey Gilmore</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2003-11-18T12:40:56</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#3901">
		<title>coldfusion/6.1/htmldocs/funct130.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct130.htm#3901</link>
		<description>IsDefined will always return true for CGI.* irrespective of the actual existence of the variable.&lt;br /&gt;&lt;br /&gt;&lt;CFIF IsDefined(&quot;CGI.UndefinedVar&quot;)&gt;&lt;br /&gt; You shouldn't see this - but you will...&lt;br /&gt;&lt;/CFIF&gt;</description>
		<dc:creator>Corey Gilmore</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2003-11-18T08:11:37</dc:date>
	</item>
	</rdf:RDF>

