The "Unnamed" scope is equivalent to the "Variables" scope in all other CFM pages (in fact, in RedSky Variables will be fixed to allow its use in the same way in CFCs [this is public info now, right?]). It is "private" to a given instance of the CFC. (It is not truly "private" in the java sense of the word, but there's no reason to confuse matters with that discussion here.)
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Davis, Eric
Sent: Wednesday, July 30, 2003 12:53 PM
To: '[EMAIL PROTECTED]'
Subject: [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
