Skip to main content
Participating Frequently
September 9, 2010
Question

Extended component wont load if the base component is in a different folder.

  • September 9, 2010
  • 1 reply
  • 381 views

Finding an odd behavior. I have a base class for a ORM component cfc.

Scenario 1: Everything works

a. Base Class in same folder as subcomponent, ie. ../cfc/artists.cfc and ../cfc/AORMComponent.cfc.

b. Code tips finds the base class when setting the extends property of the subcomponent and auto fills it as: extends="AORMComponent"

Scenario 2: Broken

a. Base class is in a subfolder named interfaces of the package that the subcomponent is in, ie. ../cfc/artists.cfc and ../cfc/interfaces/AORMComponent.cfc.

b. Code tips finds the base class when setting the extends property of the subcomponent and auto fills it as: extends="interfaces.AORMComponent"

c. The app throws the error:

Cannot load  the CFC interfaces.AORMComponent which is the parent CFC of  atestingDemo.cfc.artists.

Could not find the ColdFusion  component or interface interfaces.AORMComponent.

Anyone have any ideas what is going on here?

Thanks.

Mark

    This topic has been closed for replies.

    1 reply

    fosriasAuthor
    Participating Frequently
    September 17, 2010

    So it turns out that code tips in the new ColdFusion Builder will point to a package and fill it in without the main application in the package when you extend components. If I had changed it to:

    MyApp.cfc.interfaces.AORMComponent, all would have been (and is now) golden.