<[EMAIL PROTECTED]> wrote:
> I am getting errors when using a dynamic extends value in a CFC. My guess is, this has to do with builtin Java inheritance rules which are not allowed to be dynamically defined, is this correct?
>
> The method invoked in the extends parameter, returns a full ColdFusion component path as a string. In this case it would return iManage2004.wwwroot.objects.shared.aim
>
> I use this to override methods for a system wide shared aim.cfc into customer specific aim.cfc components.
>
> <cfcomponent extends="#server.io.getCFCPath('shared','aim')#">
> <cffunction name="check" access="public" returntype="array">
> <cfargument name="instanceid" type="numeric" required="true">
> <cfset var dependencies = arrayNew(1) />
>
> <cfreturn dependencies>
> </cffunction>
> </cfcomponent>
You're assumption is correct. The "extends" attribute is a
compile-time directive, and since the value of your variable is not
know until runtime, ColdFusion throws an error.
Regards,
Dave.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

