>> possible to access the variables scope of the calling page from within a CFC?
hang, on. you want to change the CFM variables values from within a CFC, yes? (not the
other way around?)
OK...
keep in mind that Gary'r right - this breaks encapsulation (how does the cfc know that
a particular cfm's variable actually exists or not? sure you wrote it like that but
will it ALWAYS be the case?, etc)
I haven't tried this, but can anyone see anything wrong with passing the cfm's
VARIABLES scope in byValue as a struct? (argh! my VB terms creeping in...) and then
returning the changed struct and assigning them back to the calling pages VARIABLES
scope?
<cfset myNewVars = myCFC.changeVarsMethod("#VARIABLES#") />
<cfset VARIABLES = myNewVars />
changing values byReference (eg a CFC changing SESSION or APPLICATION vars) can be
dangerous because the "blackbox" of a CFC hides what's happening.
but making a copy and changing that (to return back and replace the calling pages'
VARIABLES scope with) seems like a way to do it...
just my 2c worth
cheers
barry.b
PS: as a FYI: in custom tags is the CALLER scope a copy of the VARIABLES scope or a
pointer to it?
--
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]