Version 0.42

This new version has two requested features implemented.

First one is an option to use certain roots only when running on a specific host. Let me know if that works out for you Geoff.

And second a lazyload option. Time outs may have occured because of the cfinterface thing. The only way to detect if a cfc is a component or an interface is by opening the file up and examining it. This slows things down to a possible crawl when CFCdoc has to go through huge amounts of cfc's. Setting the lazyload option to true in the config.xml disables this feature and all cfc's are considered components. The detail view however will still display the correct info though.

Comments
Sebastian Möbius's Gravatar Hi there, I appreciate the "revamped" version of cfcdoc since it looks much more nicer now :) Eye candy definitely IS important.

One thing that I like to point out is that there is a bug in the CFCParser. Originally I informed the former author but since he is not carrying on this project anymore I am suggesting the following bugfix here now:

Problem: if some attribute contains "=" then the parser throws an exception.
Case: <cfargument name="foo" default="=">

This is the fix getTagAttributes-function:

<cffunction name="getTagAttributes" access="private" returntype="struct" output="false" hint="Parses the attributes out of the given document for the first occurrence of the tag specified and returns a structure containing name value pairs for the tag attributes.">
      <cfargument name="document" type="string" required="true">
      <cfargument name="tagname" type="string" required="true">
      
      <cfset var startTag = "">
      <cfset var stAttributes = structNew()>
      <cfset var attribName = "">
      <cfset var attribValue ="">
      <cfset var aTmp = reFindNoCase('<#arguments.tagname#[^>]*>',document,1,true)>
      <cfset var i = 1>
      <cfset var position = 1>
      <cfset var regex = '[[:space:]][^=]+="[^"]*"' >
      
      <cfif NOT aTmp.pos[1]>
         <cfreturn stAttributes>
      </cfif>
      
      <cfset startTag = mid(document,aTmp.pos[1],aTmp.len[1])>

      <cfloop from="1" to="#len(startTag)#" index="i">
         <cfif reFindNoCase(regex,startTag,position)>
            <cfset aTmp = reFindNoCase(regex,startTag,position,true)>
            <cfset attribute = trim(mid(startTag,aTmp.pos[1],aTmp.len[1]))>      
            <cfset attribName = listFirst(attribute,'=')>
            <cfset attribValue = mid(attribute,Find('=',attribute)+2,Len(attribute)-(Find('=',attribute)+2))>                        
            <cfset stAttributes[attribName] = attribValue>
            <cfset position = aTmp.pos[1] + aTmp.len[1]>
         </cfif>
      </cfloop>
      
      <cfset stAttributes.fullTag = startTag>

      <cfreturn stAttributes>
      
      
   </cffunction>


I used this Blog to post the hint because I was unable to register with th RIAFORGE-Website. I tried it various times but never received a confirmation mail albeit my email was correct.

I hope that this information is appreciated by the cfcdoc Users!
Cheers,
Sebastian
# Posted By Sebastian Möbius | 1/29/08 10:42 AM
Mary's Gravatar Dig your yellowpages,a wiki model english phrase dictionary. You can
make friends by sharing you favorites in http://www.duyp.net
http://www.diging.com
http://www.qxiu.com
http://www.qxiu.net
# Posted By Mary | 7/23/08 1:51 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.5.006.