Title: [CFCDev] "this" scope vs. unnamed

(comments, conversation interspersed)

| > Sparrow-Hood, Walter:
| >
| > First of all I'd like to thank the regular contributors to this
| > list.  I've been monitoring the discussions for the last
| > month or two and it has been extremely useful for someone
| > like me who is struggling to use CFCs correctly but who
| > doesn't have a background in Java or OOP


I'll echo that statement very loudly. Thanks for all the help you've given me, folks, whether or not you've known you've been.

| Nathan Dintenfass:
|
| ...if you want to be formal about it, you shouldn't even have a publicly
| accessible property called "name" (and you avoid that by NOT using "this"
| for your instance data -- instead use the unnamed scope [some use a
| "virtual" scope, as discussed in previous posts]).


What I can't really understand at this point is the difference between the "this" scope and the unnamed-scope-that-really-isn't-a-scope (or a virtual "instance" scope). When would it ever make sense to use this.propertyName? How about invoking other methods of the same component: this.myOtherMethod() or just myOtherMethod() ?

Or is the answer to this question so preference-based that either it isn't possible to choose a way, or it doesn't matter if you do choose, except in the case of internal standards?

Thanks again, all.

--
Eric C. Davis

Reply via email to