Dynamically creating and assigning session variables

2006-10-16 Thread Dave Hoff
I'm sure this isn't best practice, but I'm working with the menu event gateway example that ships with CF7 and I'm trying to generate the menu from a database replacing the hard-coded menu that is there. The menu is stored in a session variable and I need to dynamically assign the session name

Re: Dynamically creating and assigning session variables

2006-10-16 Thread Rob Wilkerson
On 10/16/06, Dave Hoff [EMAIL PROTECTED] wrote: I'm sure this isn't best practice, but I'm working with the menu event gateway example that ships with CF7 and I'm trying to generate the menu from a database replacing the hard-coded menu that is there. The menu is stored in a session

Re: Dynamically creating and assigning session variables

2006-10-16 Thread Dave Hoff
Thanks Rob. I'll try and paste the entire code below. for(i=1; i LTE getTopLevel.recordset.recordcount; i=i+1) { tempName = getTopLevel.recordset.name[i]; tempCFC = gateway.imified.apps. getTopLevel.recordset.cfc_name[i]; tempMethod =

Re: Dynamically creating and assigning session variables

2006-10-16 Thread Dave Hoff
Updated: Fixed!! Thanks Rob, assigning the vars using: session['M' i] did the trick. I'm sure this isn't best practice, but I'm working with the menu event gateway example that ships with CF7 and I'm trying to generate the menu from a database replacing the hard-coded menu that is there.

Re: Dynamically creating and assigning session variables

2006-10-16 Thread Rob Wilkerson
On 10/16/06, Dave Hoff [EMAIL PROTECTED] wrote: Thanks Rob. I'll try and paste the entire code below. for(i=1; i LTE getTopLevel.recordset.recordcount; i=i+1) { tempName = getTopLevel.recordset.name[i]; tempCFC = gateway.imified.apps.

Re: Dynamically creating and assigning session variables

2006-10-16 Thread Teddy Payne
You have session.root.addChild. I take it that there is a CFC named root.cfc in your session scope with the method of addChild? If this is so and you are using cfscript, why not just call the method? session.root.addChild(name=#tempName#, key=#i#); You don't have to prefix a temporary variable