No, that won't work (if I understand what you want) because "THIS" is really
a reference to the public scope, not the "whole" object, so your "instance"
variables won't copy by copying the reference to this.

You really should build a facade ;)


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Brad Howerter
> Sent: Friday, August 15, 2003 11:36 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [CFCDev] CFC Persistance
>
>
> Okay, thank you, I think I get it: the newer object is referred to by
> 'this'; I'm just breaking that reference, not replacing the new object.
>
> Actually, I don't need to do a deep copy.  I can just use
> 'instance' instead
> of the 'this' scope and then set this.instance = server.foo.instance.
>
> -----Original Message-----
> From: Sean A Corfield [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 15, 2003 12:24 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [CFCDev] CFC Persistance
>
>
> On Friday, Aug 15, 2003, at 11:09 US/Pacific, Brad Howerter wrote:
> > But it doesn't work when you try to replace an object with an older
> > cached
> > version.  You can do <cfset this = server.foo>, but it doesn't get
> > returned
> > to the caller.  I'd sure like an explanation for this behavior.
>
> Because all you're doing is setting the "this" reference to the older
> object - you're not updating the newer object with the data from the
> older object.
>
> What you need to do is a deep copy of the cached object - however that
> will be expensive. Almost certainly as expensive than initializing the
> object in the first place...
>
> Sean A Corfield -- http://www.corfield.org/blog/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood

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