Jim Davis wrote: > > As for returning "this" from a setter... I never thought about it, but I > might start (mine all return void now). I may personally never use it, but > if it doesn't affect performance it leaves to possibility open for others > that might want to.
I return "this" from pretty much everything. I don't typically use it to chain methods because I find it harder to read, but if the next maintainer likes it the code is there for him to use :) One small additional benefit is where people new to the whole CFC thing use code like: <cfset object = object.setVar(val)> This actually works if you return "this", even if it is not good practice. Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188933 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54