Thanks again for the suggestions.  Last question, I swear:  why do you not like 
using the <cfscript> tag at the top of your components?  That seems to be the 
cleanest solution, since you don't have to explicitly call the init function 
outside of the component.  Is there a performance hit to this method, or do you 
simply prefer to not have functionality buried in your components that resides 
outside of the functions?




>Well, theres a lot of answers to that question, but heres two:
>
>
>Way I would do it:
>
><cfscript>
> testcom = createobject("component","path.to.component");
> testcom.init();
></cfscript>
>
>
>Another way, which I wouldnt do:
>
><cfcomponent>
>
><cfscript>
>       init();
></cfscript>
>
><cffunction name="init" access="package" output="no">
>       <cfset mystruct = structNew()>
>       <cfset mystruct.initvar = "init varvalue">
></cffunction>
>
></cfcomponent>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:207881
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to