Changes between Version 5 and Version 6 of QuickStart/4:HandlingaForm

Show
Ignore:
Timestamp:
09/03/09 18:39:08 (16 years ago)
Author:
cfgrok (IP: 64.30.223.5)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • QuickStart/4:HandlingaForm

    v5 v6  
    5050Still nothing? There's one last piece to the puzzle: write a !TranslatePhrase function in the Controller that asks our Model to translate a phrase! That's easy enough - just open /translator/controller/Controller.cfc and add the following <cffunction>: 
    5151 
    52 (Note: for CF9, use addTraceStatement() instead of trace() ) 
    53  
    5452{{{ 
    5553<cffunction name="TranslatePhrase" access="public" returntype="void" output="false"> 
     
    6058    <cfset var result = translator.translate(phrase) /> 
    6159 
    62     <cfset arguments.event.trace("TranslatePhrase Results", result) /> 
     60    <cfset arguments.event.addTraceStatement("TranslatePhrase Results", result) /> 
    6361    <cfset arguments.event.setValue("translatedPhrase", result) /> 
    6462</cffunction> 
    6563}}} 
     64 
     65(Note that in prior versions of the framework, the addTraceStatement() function was named trace(), but this was changed in order to support !ColdFusion 9, which was added a native trace() function to CFML.) 
    6666 
    6767So what does all that do?