Skip to main content
August 26, 2010
Question

Component loop

  • August 26, 2010
  • 1 reply
  • 275 views

In my application I have different .cfc files. file1.cfc, file2.cfc, file3.cfc....

If I create in file1.cfc 

<cfset app.file2 = createObject("file2","directory").init(variables)>

end in file2.cfc

<cfset app.file1 = createObject("file1","directory").init(variables)>

This creates a infinite loop and I get stack overflow error.

Is there any way around this?

Is there any other way to call a method from another file?

    This topic has been closed for replies.

    1 reply

    Inspiring
    August 26, 2010

    I've never seent hat syntax for createObject().  Are you sure about that?

    --

    Adam