Sean

When you use VARIABLES instead of THIS, are variables persistant throughout
the call of the object?

for example, i have a script that I use for recursion.  As a call to a
component does not have an exit point, you can't call thisTag.executionMode
to find out when the exit point is, 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 ?

I would have thought that VARIABLES is only available to the function that
set the variable and not to the whole CFC itself during the call as by
setting VARIABLES is decaring the variable for its container, being the
function.

Steve

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Sean A
Corfield
Sent: Saturday, May 01, 2004 2:03 AM
To: CFAussie Mailing List
Subject: [cfaussie] Re: init vars within a cfc


What you've got below is fine but use "variables." instead of "this."
otherwise you'll be creating publicly accessible data (when you really
only want the data to be accessible inside the CFC instance).

On Apr 30, 2004, at 6:19 AM, Jamie Lawrence Jenner wrote:
> function initvars {
> this.ordernumber = ""
> this.orderaddress1 = ""
> this.orderaddress2 = ""
> }
>
> then when each function is invoked they would do this
>
> function getcustaddress{
> retrieves cust address and inserts into orderaddress
> set this.orderaddress1 = #getcustaddress.address1#
> set this.orderaddress2 = #getcustaddress.address1#
> returns orderaddressid
> }
>
> A final function would then be invoked from submitorder and send an
> email
>
> function sendmail{
> <cfmail...>
> Your order will be sent to:
> #this.orderaddress1#
> #this.orderaddress2#
> </cfmail>
> }


---
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

Reply via email to