Sean -
You say:
><cfset foo = createObject("component","foo")/>
> <cfinvoke component="#foo#" method="bar"/>
> <cfinvoke component="#foo#" method="fubar"/>
>
>Note that you do NOT need a *persistent* scope per se, just a >scope that
>covers all the calls you need to make - in the case above, >variables scope
>(the default) is fine. If you need to access that single instance >across
>multiple pages, then request or session scope would be more >appropriate.
You don't really mean to say that the request scope persists across pages, do you?
Chuck
>
> From: Sean A Corfield <[EMAIL PROTECTED]>
> Date: 2002/09/05 Thu AM 11:01:40 CDT
> To: CF-Talk <[EMAIL PROTECTED]>
> Subject: Re: flash-remoting and cfc properties
>
> On Wednesday, September 4, 2002, at 11:00 , Jon Gorrono wrote:
> > My tests of using cfset in the 'this' scope have failed to get
> > persistence btween calls to remote methods. For example, I 1)
> > initilialize this.lasterror before any function tag 'declarations', 2)
> > change the value in one method, which also puts the proof into cflog, 3)
> > then call another method (using the same line of code).... blotto! The
> > value gets re-initialized just b4 the second method call...
>
> You don't show your code but I'll bet you are doing something like:
>
> <cfinvoke component="foo" method="bar"/>
> <cfinvoke component="foo" method="fubar"/>
>
> This creates a separate instance for each invoke so your CFC is being
> initialized each time. In order to persist instance data between calls,
> you must use the *same* instance:
>
> <cfset foo = createObject("component","foo")/>
> <cfinvoke component="#foo#" method="bar"/>
> <cfinvoke component="#foo#" method="fubar"/>
>
> Note that you do NOT need a *persistent* scope per se, just a scope that
> covers all the calls you need to make - in the case above, variables scope
> (the default) is fine. If you need to access that single instance across
> multiple pages, then request or session scope would be more appropriate.
>
> Sean A Corfield -- http://www.corfield.org/blog/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists