Include files for callback function within a CFC - gotcha

0 views
Skip to first unread message

redtopia

unread,
Feb 10, 2010, 2:40:40 PM2/10/10
to CFCDev
I wrote a visit function for a CFC object that calls a specified
callback function for each node in the CFCs data. The problem is that
the visit callback requires an include file consisting of a bunch of
helper functions. There's no way for the CFC to know in advance which
include files might be needed for any visit callback. So I added an
argument to the visit function that is a list of include files to
include before doing the visit operation. I thought it was a pretty
slick way to deal with the probelm, but there's one HUGE catch... you
can only do it once. If you call the visit function again with the
same includes, you'll get a "routines can only be declaired once"
error.

It seems that after you include the files from the visit function,
they become part of the CFC, and you can't include them again.

Does anyone have any work-around ideas?

Reply all
Reply to author
Forward
0 new messages