Scotty,
Going back to your original question, how about copying the form to a normal
struct instead? ie:
<cfscript>
// Copy the Form
stForm = StructCopy(form);
stForm.ItemID = "22";
stForm.Qty = "10";
stForm.ChckInDate = "14/12/2002";
stForm.Duration = "3";
stForm.Price = "$300.00";
stForm.Inclusions = "blah";
stForm.NoTraveling = "1";
stForm.Notes = "blash";
stForm.Rooms = "2";
stForm.TravelNames = "Agnus, Delila";
// Define the Objects Instance
theCart = createObject("component","comp.shopcart.cart");
theCart.Add(stForm);
StructClear(stForm);
stForm = StructNew();
stForm.ItemID = "12";
stForm.Qty = "1";
stForm.Price = "$600.00";
stForm.Inclusions = "blah";
stForm.NoTraveling = "1";
stForm.Notes = "blash";
stForm.TravelNames = "Agnus, Delila2";
theCart.Add(stForm);
</cfscript>
"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/