No, you don't have to create the 'scope' first. Just saying: <cfset myScope.name = "Charlie" />
will implictly create a struct called "myScope" with a key of "name". but, as Cameron points out... referring to this as a "custom scope" will likely lead to confusion. Might be a good idea to back up a step or two and ask why you're looking to do this? On Mon, Sep 21, 2009 at 10:30 AM, Rick Sanders <[email protected]> wrote: > > Thanks. Makes sense I have to create the scope before assigning a var to > it! > > -----Original Message----- > From: Charlie Griefer [mailto:[email protected]] > Sent: September-21-09 1:50 PM > To: cf-talk > Subject: Re: Custom scopes > > > In other words, you're implicitly creating a structure called 'myscope' > with > a key called 'var' (and then that structure gets put into the > local/variables scope anyways). > > On Mon, Sep 21, 2009 at 9:46 AM, Alan Rother <[email protected]> > wrote: > > > > > Of course. > > However... what you have really done is create a variable called > > > > variables.myscope.var > > > > > > =] > > > > -- > > Alan Rother > > Adobe Certified Advanced ColdFusion MX 7 Developer > > Manager, Phoenix Cold Fusion User Group, AZCFUG.org > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326463 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

