Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Component loop

Guest
Aug 26, 2010 Aug 26, 2010

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?

253
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 26, 2010 Aug 26, 2010
LATEST

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

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources