No, He requested that 'this' be returned, i.e. the object itself.
He said nothing about public or private methods. He wanted to be able to port the Object, public, or private state all across. Mark On 8/9/06, Dale Fraser <[EMAIL PROTECTED]> wrote: > > Mark, > > Your example showed nothing. There is nothing public to see if the object > would be accessible externally. If you don't want a public variable, then at > least make your getter public so that we could establish if the object could > be accessed. > > Andrew requested a this. Scope variable (public) so that he could see if > that variable would be visible in the object. > > Regards > Dale Fraser > > http://dale.fraser.id.au > > > > > > -----Original Message----- > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf > Of Mark Mandel > Sent: Wednesday, 9 August 2006 11:33 AM > To: cfaussie@googlegroups.com > Subject: [cfaussie] Re: Quick question > > > Why would you be using public variables, Dale? > > Mark > > On 8/9/06, Dale Fraser <[EMAIL PROTECTED]> wrote: > > > > Mark, > > > > But you didn't include any public variables, only private ones. > > > > Can you do it again with a this variable? > > > > Regards > > Dale Fraser > > > > http://dale.fraser.id.au > > > > > > > > > > -----Original Message----- > > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On > Behalf > > Of Mark Mandel > > Sent: Wednesday, 9 August 2006 11:11 AM > > To: cfaussie@googlegroups.com > > Subject: [cfaussie] Re: Quick question > > > > > > Exactly. > > > > I ran a quick test: > > > > This is the CFC I created: > > <cffunction name="init" hint="Constructor" access="remote" > > returntype="obj" output="false"> > > <cfscript> > > setThing("fred"); > > > > return this; > > </cfscript> > > </cffunction> > > > > <cffunction name="getthing" access="private" returntype="string" > > output="false"> > > <cfreturn variables.thing /> > > </cffunction> > > > > <cffunction name="setthing" access="private" returntype="void" > > output="false"> > > <cfargument name="thing" type="string" required="true"> > > <cfset variables.thing = arguments.thing /> > > </cffunction> > > </cfcomponent> > > > > This is the wddx it returns when you access it via the URL: > > <wddxPacket version='1.0'><header/><data><struct > > type='coldfusion.runtime.TemplateProxy'><var name='INIT'><struct > > type='Lcfobj2ecfc496430799$funcINIT;'><var > > name='access'><string>remote</string></var><var > > name='metadata'><struct > > type='coldfusion.runtime.AttributeCollection'><var > > name='HINT'><string>Constructor</string></var><var > > name='RETURNTYPE'><string>obj</string></var><var > > name='ACCESS'><string>remote</string></var><var > > name='OUTPUT'><string>false</string></var><var > > name='PARAMETERS'><array length='0'></array></var><var > > name='NAME'><string>init</string></var></struct></var><var > > name='output'><string>false</string></var><var > > > name='pagePath'><string>C:\Inetpub\wwwroot\test\returns\obj.cfc</string></va > > r><var > > name='returnType'><string>obj</string></var><var > > name='superScope'><struct type='coldfusion.runtime.VariableScope'><var > > name='SUPER'><struct > > > type='coldfusion.runtime.SuperScope'></struct></var></struct></var></struct> > > </var></struct></data></wddxPacket> > > > > See? > > > > Mark > > > > On 8/9/06, Andrew Scott <[EMAIL PROTECTED]> wrote: > > > > > > That's what I was afraid of, so if this.teststring = 'test'; would not > be > > > returned in the object is what your saying? > > > > > > Senior Coldfusion Developer > > > Aegeon Pty. Ltd. > > > www.aegeon.com.au > > > Phone: +613 8676 4223 > > > Mobile: 0404 998 273 > > > > > > > > > -----Original Message----- > > > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On > > Behalf > > > Of Mark Mandel > > > Sent: Wednesday, 9 August 2006 11:02 AM > > > To: cfaussie@googlegroups.com > > > Subject: [cfaussie] Re: Quick question > > > > > > > > > Andrew, > > > > > > CFC's are not serialisable, so all you get back is a WDDX packet that > > > describes the CFC, not its current state. > > > > > > Mark > > > > > > On 8/9/06, Andrew Scott <[EMAIL PROTECTED]> wrote: > > > > > > > > Mark, > > > > > > > > Thanks but the code I use also allows for wddx, so if it was to return > > > this, > > > > it would be serialised as a wddx packet and reserialised at the other > > end > > > > anyway. jsmx is great in this way. > > > > > > > > I am also aware of the differences in cfc's as not being normal java > > > > objects, but I did rewrite my own java version of cfquery once before > > > which > > > > worked well as an object of type Map, which is why I was thinking out > > > aloud > > > > here. > > > > > > > > > -- > > > E: [EMAIL PROTECTED] > > > W: www.compoundtheory.com > > > > > > > > > > > > > > > > > > > > > > -- > > E: [EMAIL PROTECTED] > > W: www.compoundtheory.com > > > > > > > > > > > > > > > > -- > E: [EMAIL PROTECTED] > W: www.compoundtheory.com > > > > > > > -- E: [EMAIL PROTECTED] W: www.compoundtheory.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie -~----------~----~----~----~------~----~------~--~---