You can’t use a variable in the extends attribute. If you do, an error like “This _expression_ must have a static value.” pops up.

 

That’s a pitty. For development reasons, for me it’s a huge negative point in the Object Based approach of Macromedia.

Another problem is the use of overloaded and overridden methods. I know the solution is to use optional variables, but that’s just good enough… Someone knows another solution for that?

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lucian COZMA
Sent: maandag 24 mei 2004 17:17
To: [EMAIL PROTECTED]
Subject: [CFCDev] component extends object with relative path

 

Hello all.

 

I want to create a cfc that extents another cfc located in a relative path (non-mapped) as shown below:

/
  models/porsche.cfc
  vehicles/car.cfc

I want that porsche.cfc extends vehicles/car.cfc:
<cfcomponent extends="../vehicles/car>

I know that it doesn't work , but is there a way of doing such a thing ?

I cannot use full-package names (mysite.site1.vehicles.car), as the path is unknown and there is a whole lotta' mess in the placements of the components in the existing application .
Should I extract the class name from the path and use it dynamically in the 'extends' attribute (like: extends="#myClassPath#") ?

On the same page, a related question, is there any way of adding programatically a mapping (not using the Administrator) ?

 

Thanks,

Lucian @ InterAKT Online

 

 

Reply via email to