My PERSONAL preferences is that if the method being calling has 0 or 1 
argument, then use a function call such as othermethod(). If it has 1 or more 
arguments, then use a <cfinvoke method="othermethod">. DO NOT USE a component 
argument in an internal CFINVOKE as it will invoke a new instance of the 
component. A CFINVOKE without a component argument assumes that it is a call to 
a local method. 

The times to use a CFINVOKE vs. a method call is all up to you based both on 
the method being called and the place where it is being called. 

>I hope this is a basic question.
>
>Let's say I have a CFC that does all of my email-related functions. 
>One of those methods (for example, insertEmail) needs to call another
>method (for example, checkEmail) that is part of the same CFC.  For
>instance:
>
>CFCOMPONENT
>CFFUNCTION NAME = CHECKEMAIL
>(email address gets passed in as an argument, used to query the
>database and see if the email address is (a) of valid format (OK, the
>database isn't required for this) and (b) already exists in the
>database)
>CFRETURN SOME SORT OF INDICATOR OR MESSAGE
>/CFFUNCTION
>
>CFFUNCTION NAME = INSERTEMAIL
>email address gets passed in as an argument.  FIRST I want to call the
>CHECKEMAIL method, then use the value that is returned to either (a)
>insert the record into the database, or (b) not insert the record into
>the database.
>CFRETURN SOME SORT OF MESSAGE
>/CFFUNCTION
>/CFCOMPONENT
>
>What is the best way to do this?  
>
>Thanks,
>
>Pete

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216046
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to