> thinking of writing some sort of preprocessor that would convert a > cfscript-like syntax
that's a great idea! New project! > -----Original Message----- > From: Oliver Tupman [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 21, 2003 1:39 AM > To: CF-Talk > Subject: Re: UDF in CFC's - was: CFC Issues.... > > > Paul Spitzer wrote: > > > Paul (wishing I could use script syntax for everything) > > Join the club! > > > wow!.. I didn't know you could do that. Is there *any* way to make them > > private? > > Unfortunately not, neither is there a way to stop them producing output > like through the CFML cffunction attribute output="false". I was > thinking of writing some sort of preprocessor that would convert a > cfscript-like syntax such as > > private numeric function someFunc(numeric fredSalary, string fredName) > > But I haven't found the time. It may even be possible to link it in > before the CFM/CFC compilation stage in CF, but that's just a thought > (extend the compilation class CF uses for compiling CF files?) > > >I noticed that the component documentation says all the arguments > > are required, is it possible to declare which arguments are required and > > which ones aren't? What else can you do with this... playing > with it, it > > really doesn't seem very flexible, but I still have hope. > > Hmm, didn't know the component docs say all are required! From what I've > seen <cffunction>s are declared in a very similiar manner to UDFs - you > can set a <cfargument>'s required attribute to false/no if you so wish. > > For exmaple: > <cfcomponent> > <cffunction name="fred" output="false"> > <cfargument name="nameIs" type="string" > required="false" default="Fred!"/> > <cfreturn nameIs/> > </cffunction> > </component> > > And then call an object of this component with > > <cfset someComponentInstance.fred()/> > > or > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm

