Kerry, Thanks for your help. You're certainly right about the duplicate function...and of course I should have known that already.
But I'm a little confused about your statement that I shouldn't do this: <cfif NOT isDefined("mystruct")><cfset this.init()></cfif> I could call any function in my component at any time, so I have no way of guaranteeing that init has been called previously. If the above code is not advised, then how can I ensure that my init function is called? >If you do this: > ><cfset var s = structNew()> ><cfset s = mystruct> > >Then s is not a struct, but a pointer to mystruct, so whenever you set a >property of s, you are in fact setting a property of mystruct. > > >Also, personally, theres no way i would do this: > ><cfif NOT isDefined("mystruct")><cfset this.init()></cfif> > > >I would do: > ><cfset var s = duplicate(mystruct)> > >if mystruct isnt defined, then the component hasnt been inited, which means >the code isnt right, and an error should be thrown. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207875 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54