Or do an isCustomFunction test on the variable as you loop -- doing the
metaData loop is going to be inefficient (and you'll need to do it
recursively if you extend).

This (the issue of the cruft in Variables) is one of the reasons I tend to
use something like Variables.instance as a struct to hold my "instance"
data -- so my instance data is separate from "Variables" itself.




> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Barney Boisvert
> Sent: Thursday, September 25, 2003 3:50 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] Serialize?
>
>
> You can use getMetaData(this) to get a list of function names for the
> current object.  Then just don't serialize any variables that match that.
> Have to kluge it because functions are data in CF.
>
> barneyb
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Behalf Of Justin Balog
> > Sent: Thursday, September 25, 2003 3:35 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: [CFCDev] Serialize?
> >
> >
> > Thanks for catching that Ray.  It still craps out on me....
> >
> > <cfelse>
> >     <cfset result.nonCFC[i] = variables[i]>
> > </cfif>
> >
> > This seems to slow it down considerably.  Do I really need to
> > serialize the
> > methods as well? Or can I just serialize the instance vars?  If
> > that is the
> > case, couldn't I have some property that defines which vars to
> serialize?
> > Because as it stands, the resulting struct 'result.nonCFC'
> > contains all the
> > methods of the cfc, which is cool in case the cfc changes before it is
> > deserialized....but I don't think I really need to worry about
> > that (this is
> > just to capture the event and object in case of a dB
> failure...it will be
> > tended to rather quickly).
> >
> > Thanks for everyone's feedback,
> >
> > Justin
> >
> > -----Original Message-----
> > From: Raymond Camden [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 25, 2003 4:23 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [CFCDev] Serialize?
> >
> >
> >
> > > I was writing a similar loop function to the one you
> > > presented earlier.  Its looks a little like this, and
> > > evertime I run it, the sucker loops for ever and kills the
> > > server.  Any thing horribly wrong with the code? Also I
> > > wasn't sure what return type I would use.
> >
> > No var scope for the "i" variable.
> >
> > -ray
> >

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