Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Nytyme #1
BUG: failure to acknowledge scope
I have a recursive function that sets a LOCAL variable and calls itself until a
condition is met. Basically I'm turing a Structure into and XML packet.
I've attached my code. it is not behaving as expected. it is expected to
perform like ASP,JS, SQL, or any other language, that is a function level
variable is only defined for that function. i shouldn't have create a unique
variable name and make work arounds for something CF is touting ("Recursive
Functions").
function writeBranch(str)
{
var local = StructKeyArray(str);
var text = "";
for(x = 1; x lte arraylen(local); x = x + 1)
{
cur = local[x];
text = text & "<" & cur & ">";
/**/
if( isStruct(str[cur]) )
{
text = text & writeBranch(str[cur]);
}
text = text & "</" & cur & ">";
}
return text;
}
Nytyme Guest
-
What is the scope of a structure?
Hello, The function "StructNew" create an new structure BUT what is the structures's scope? (session, client, ....) I have the impression it's... -
Life Scope
In MS' TimeTracker sample app, a middle-tier component BLL has a class named TimeEntry. It's used in TimeEntry.aspx to remember a certain state of... -
Problem with sessions (in global scope vs class scope)
Hello, i'me having a wierd problems with sessions. PHP 4.3.3, Register globals is on, and the sessions module is installed. if i have a page like... -
scope of web-service
Web services are typically there to service a request from a client. Ideally, I feel, that the webservice itself should be stateless and should... -
variable scope in c#
I'm calling this procedure from a custom validator OnServerValidate event. I keep getting the error : Use of unassigned local variable...



Reply With Quote

