Tim, >Thanks for your replies. Do you have any tips to create this serialize >function? My CFC has some instantiation variables set (this.numberitems, >this.cartType, etc) and those are really the only variables I want to >serialize. I tried using CFWDDX with an input of "#variables#" and again >with an input of "#this#" but all that was sent back were the functions of >the CFC. I am just trying to prevent having to hardcode this variables in >my serialize function when I am creating a structure of the data.
As Dave stated, most people use a local variable like "instance" instead of "this" to store properties. This essentially makes them private properties, but using getter/setter methods this allows you to control the variables and make sure that the proper constraints are maintain. Plus, if you use a variable like "instance" to maintain those properties, you can just use WDDX to serialize the instance variable. Very easy to serialize/deserialize the CFC. The one thing you've got to watch with this is that if any of your private members are CFCs, you'll have serialization issues with those that you have to handle. You could write some very basic methods to handle all this serialization/deserialization and put it in a base class that you always extend. If you're constant throughout your framework, this should be pretty manageable. -Dan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236646 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

