Scott Was refering to the actual deletion of a structure
if you convert it to a simple value, the structure gets deleted Regards Steve Onnis Domain Concept Designs +61 422 337 685 +61 3 9444 7504 http://www.domainconceptdesigns.com <http://www.domainconceptdesigns.com> ("If you think it can't be done, you haven't asked me!") - Steve Onnis -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Scott Barnes Sent: Monday, January 20, 2003 5:09 PM To: CFAussie Mailing List Subject: [cfaussie] Re: Structures Actually, it works without the conversion to simple value :D i.e. loose the temp = "" and use run with StructNew declaration. Scott "Steve Onnis" <[EMAIL PROTECTED]> wrote in message news:22063@cfaussie... > > And also we, Scott and me, found that if you convert a structure to a simple > value, > ie > <cfscript> > temp = StructNew(); > temp.var1 = "hello"; > temp = ""; > temp = StructNew(); > </cfscript> > > you can actually delete the base structure. This even works for the form > structure, but you can't create it again like you can with self created > structures > > > Regards > > Steve Onnis > Domain Concept Designs > +61 422 337 685 > +61 3 9444 7504 > > http://www.domainconceptdesigns.com <http://www.domainconceptdesigns.com> > > ("If you think it can't be done, you haven't asked me!") - Steve Onnis > > > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Tim > McAuliffe > Sent: Monday, January 20, 2003 4:47 PM > To: CFAussie Mailing List > Subject: [cfaussie] Re: Structures > > > GDay Scott, > > <cfset tmp = StructClear(form)> > > or (better IMO) > > <cfscript> > StructClear(form); > </cfscript> > > Will clear the structure. The structure name 'form' is reserved and will > always be defined. > > HTH > > Tim > > > "Scott Barnes" <[EMAIL PROTECTED]> wrote in message news:22052@cfaussie... > > > > How do i reset a structure completely for re-use? > > > > Basically what happens is the last form.structure build resets all > > "Previous" structures to its value? when in fact i just want it to have > each > > of its own instance.. ie like a tmp variable in a loop if you will. > > > > Scott. > > > > --- Code here -- > > <cfscript> > > > > // Emulate the Form > > form = StructNew(); > > form.ItemID = "22"; > > form.Qty = "10"; > > form.ChckInDate = "14/12/2002"; > > form.Duration = "3"; > > form.Price = "$300.00"; > > form.Inclusions = "blah"; > > form.NoTraveling = "1"; > > form.Notes = "blash"; > > form.Rooms = "2"; > > form.TravelNames = "Agnus, Delila"; > > > > // Define the Objects Instance > > theCart = createObject("component","comp.shopcart.cart"); > > theCart.Add(form); > > > > > > StructClear(form); > > form = StructNew(); > > form.ItemID = "12"; > > form.Qty = "1"; > > form.Price = "$600.00"; > > form.Inclusions = "blah"; > > form.NoTraveling = "1"; > > form.Notes = "blash"; > > form.TravelNames = "Agnus, Delila2"; > > > > theCart.Add(form); > > </cfscript> > > > > <cfdump var="#theCart#"> > > > > > > -- > > Freelance Application Developer / Designer > > -- > > ph: 07 3288 6702 > > mob: 04040 32812 > > -- > > url: http://www.spidaweb.com > > > > > > > > > > > > > > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to [EMAIL PROTECTED] > > MX Downunder AsiaPac DevCon - http://mxdu.com/ > > > --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/ --- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/
