> >I think you mean putting code within the CFCOMPONENT tags, 
> but outside 
> >of any CFFUNCTION tags.
> 
> Yes, this is commonly referred to as the "unnamed scope" in 
> CFCs, and is the 
> only true private scope (contrary to some posts on cf-talk 
> and elsewhere, 
> the "this" scope is not private as in Java).

Actually, I think most people call this the constructor area. The use of
variables that are not arguments, this scoped, or var scoped, is called
the unnamed scope. I'd like people to call it the Camden scope. :>


> 
> >You are probably better off having another method in your 
> component (or
> >somewhere) that is specifically called in each method rather than 
> >relying on the "constructor".  Who knows, that behaviour 
> could change 
> >in a future version of CF.
> 
> Relying on unintended features has bitten people in the past (i.e., 
> accessing the CF factory directly, which was subsequently 
> closed). I've 
> personally always found it best to rely on existing product features 
> (including both CF features and Java features) rather than 
> community-promoted "hacks," as that allows me to figuratively 
> point the 
> finger at Macromedia if the functionality is later changed or 
> deprecated.

While in general I'd agree, I think the Constructor concept, although
technically a hack, is something that many CFC developers are using. I
don't think it's dangerous to use at all.

========================================================================
===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email    : [EMAIL PROTECTED]
Blog     : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

Reply via email to