If I have application.myObject which is an object, and I copy that to the
request scope: 

<cfset request.myObject = application.myObject>

Then where is the object actually stored? Is it a deep copy or is it still
an application variable being referenced?


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Raymond Camden
> Sent: Wednesday, 22 October 2003 9:06 a.m.
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] Duplicate() and CFCs
> 
> Simply put - you can't duplicate a CFC.
> 
> Well, you can, but what you get isn't a CFC.
> 
> ========================================================================
> ===
> 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
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Phillip Cave
> > Sent: Tuesday, October 21, 2003 3:07 PM
> > To: [EMAIL PROTECTED]
> > Subject: [CFCDev] Duplicate() and CFCs
> >
> >
> >
> > Hello.
> >
> > I'm working with a component that is stored in application
> > scope. When a
> > duplicate() of the application scope is performed like in the
> > code below, I get an error that says the variable 'instance'
> > is not defined when I try to run
> > request.app.objSQLServerDAOFactory.dump(). Calling
> > application.objSQLServerDAOFactory.dump() works fine.
> >
> > lock
> > application.objSQLServerDAOFactory =
> > application.objDAOFactory.init(application.objDAOFactory.SQLServer);
> > request.app = duplicate(application);
> > /lock
> >
> > However, if duplicate is not used as in request.app =
> > application; then running
> > request.app.objSQLServerDAOFactory.dump() runs as expected.
> >
> > Can someone explain to me why this is? I'm know duplicate()
> > does a deep copy and assigning the value directly just gives
> > you a reference to the original variable.
> >
> 
> 
> ----------------------------------------------------------
> 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).
> 
> An archive of the CFCDev list is available at www.mail-
> archive.com/[EMAIL PROTECTED]



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

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to