calling page: <cfset objRequisition.AUTHORISE_CODE=trim(FORM.AUTHORISE_CODE)> <cfset objRequisition.AUTHORISE_NOTE=trim(FORM.AUTHORISE_NOTE)> <cfset sucess = objReqAdmin.update()>
and within the CFC I can get to those vars as THIS.AUTHORISE_CODE and THIS.AUTHORISE_NOTE. that's why they're public. HOWEVER if I wanted a var that was NOT public (to the calling page) but still had CFC scope then that's where the VARIABLES scope within a CFC comes in. <cfset var myVar= "blah"> <!--- local function scope ---> <cfset VARIABLES.myVar= "blah"> <!--- CFC "private" scope ---> <cfset THIS.myVar= "blah"> <!--- CFC public scope ---> Sean, would it be safe to say that VARIABLES scope within a CFC can be known as "PROTECTED" scope al la VB.NET? cheers barry.b -----Original Message----- From: Steve Onnis [mailto:[EMAIL PROTECTED] Sent: Monday, 3 May 2004 2:40 PM To: CFAussie Mailing List Subject: [cfaussie] Re: init vars within a cfc so when you say THIS is public, that means i can access them where? In the calling page? from other CFCs? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Sean A Corfield Sent: Monday, May 03, 2004 1:58 PM To: CFAussie Mailing List Subject: [cfaussie] Re: init vars within a cfc On May 2, 2004, at 8:08 PM, Steve Onnis wrote: > When you use VARIABLES instead of THIS, are variables persistant > throughout > the call of the object? In both cases the variables exist for the lifetime of the object. The only difference between VARIABLES scope and THIS scope is that THIS scope is public (and VARIABLES scope is non-public). > so I use THIS to maintain my variabled > throughout the call of the function throughout its recursion as I > round it > the only way I could maintain the points in the recursion. > > Or is this wrong ? You should use VARIABLES scope since this is not public data. > I would have thought that VARIABLES is only available to the function > that > set the variable No, that's the local VAR scope. Regards, Sean --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004 --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004 --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004
