Dave Merrill wrote:
Do you mean that the function is returning another object? Otherwise, just return the result from the other function call with the correct returntype. If you returning an object, then it could return "any" however I think the better approach is to return the dot-deliminated path to the CFC (anybody else, please feel free to correct me - I'm caffeine free today so far and it's the afternoon here).Thanks Peter, that's all what I suspected. I am aware of the other considerations you mentioned.
BTW, if a method returns a function, would you use a returntype of "any"?
Thanks,
Dave Merrill
<cfffunction name="thisFunction" access="public" output="false" returntype="path.to.some.otherObject"
hint="I do something and return another object" >
<cfargument value="someValue" required="yes" type="numeric" />
<!--- I know this is redundant by setting the variable in this example and returning it right away - it would be better just to put the createObject in the cfreturn - illustration purposes only --->
<cfset var someObject = createObject("component", "path.to.some.otherObject").init(arguments.someValue) />
... DO OTHER STUFF ...
<cfreturn someObject />
</cffunction>
Does that make sense?
-- Peter J. Farrell :: Maestro Publishing
blog :: http://blog.maestropublishing.com email :: [EMAIL PROTECTED] phone :: 651-204-0513
On Stardate 9567.39 which is Tuesday, I saw the light. --
---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
