#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2015
    Posts
    2
    Rep Power
    0

    How to call a method on a different CFC file


    Hi, how i can call another cfc file and use its method??
    Im not very good in OOP. My Learning is in progress.

    Example:
    CFCfile01.cfc
    Code:
    <cfcomponent>
    	<cffunction name="Query" access="public" returntype="string">
    		queries....
    	</cffunction>
    </cfcomponent>
    CFCfile02.cfc
    Code:
    <cfcomponent>
    	<cffunction name="GetData" access="public" returntype="string">
    		use the CFCfile01.Query
    	</cffunction>
    
    	<cffunction name="GetStuffs" access="public" returntype="string">
    		use the CFCfile01.Query
    	</cffunction>
    </cfcomponent>
    Thanks in advance :-)
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,307
    Rep Power
    970

IMN logo majestic logo threadwatch logo seochat tools logo