The only time I ever use 'this' in CFCs is <cfreturn this /> in my init() method. If you need public variables (which is usually a questionable practice), that's another place to use it, but other than that, you shouldn't ever need the 'this' psuedo-scope. All your private instance data should be in the 'variables' scope (or variables.my, variables.instance, etc.).
cheers, barneyb On 5/24/05, Paul Roe <[EMAIL PROTECTED]> wrote: > So when is it appropriate to use the 'this' ope rater when dealing with cfc's? > > It was always easy to figure out in java because it either worked or > it didn't. Now with cf I'm finding myself writing inconsistent code > because I don't have a good enough understanding of when you should > and shouldn't use 'this'. Any suggestions about reading materials or > just any general standards advice would be appreciated. > > Thanks in advance > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
