home Links Articles Books Past Meetings Photos SiteMap
The MDCFUG is sponsored by TeraTech. Visit us at www.TeraTech.com

Please send
comments/questions to

michael@
teratech.com

 
PPT Slide

PPT Slide

    Example: Tag based UDFs

    <CFFUNCTION NAME="IsScheduledTask" RETURN="Boolean">
    <CFARGUMENT NAME="TaskName" REQUIRED="True" TYPE="String">
    <!--- var local vars for the func --->
    <CFSET Var TaskXML="">
    <CFSET Var GetTasks="">
    <!--- get the scheduler xml file. It's stored as WDDX --->
    <CFFILE ACTION="Read“ FILE="#Server.ColdFusion.RootDir#\lib\neo-cron.xml“ VARIABLE="TaskXML">
    <!--- convert the WDDX to CFML - and array of structs --->
    <CFWDDX ACTION="WDDX2CFML" INPUT="#TaskXML#" OUTPUT="GetTasks">
    <!--- search the array of structs for the name passed to the func --->
    <CFIF ListContainsNoCase(StructKeyList(GetTasks[1]), Arguments.TaskName) EQ 0>
    <CFRETURN False>
    <CFELSE>
    <CFRETURN True>
    </CFIF>
    </CFFUNCTION>
    <CFOUTPUT>Is "Test" a scheduled task? #IsScheduledTask("test")#<BR>
    Is "Jest" a scheduled task? #IsScheduledTask("jest")#</CFOUTPUT>

Previous slide Next slide Back to first slide View graphic version


Home | Links | Articles | Past Meetings | Meeting Photos | Site Map
About MDCFUG | Join | Mailing List |Forums | Directions |Suggestions | Quotes | Newbie Tips
TOP

Copyright © 1997-2017, Maryland Cold Fusion User Group. All rights reserved.
< >