You can add methods at run-time to CFC instances, but I would tread very
carefully into that terrain.

I don't know of a way to get to the attributes of CFFUNCTION
programmatically outside of that tag -- I would not be surprised if it's
theoretically possibly by accessing the underlying java object of a CF
function, but that would be bad in at least two ways: First, the underlying
java API could change, as it's most certainly not supported to manipulate it
directly.  Second, you might not understand assumptions being made in the
underlying code and cause subtle bugs in your code causing unexpected
behaviors.



> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Hardy Jonck
> Sent: Wednesday, October 29, 2003 3:14 AM
> To: [EMAIL PROTECTED]
> Subject: [CFCDev] Cf Script Methods and CFML Method attributes
>
>
> Is it possible to set method attributes manually.
>
> For instance: <cffunction name='xy' output='Yes' >  could one do something
> like this:
> function xy()
> {
>       // Some Op
> }
>
> function setCfAttributes()
> {
>       x.output = 'Yes';
> }
>
> Also for component Y:
> <cfcomponent name='Y'>
> function x()
> {}
>
> function z()
> {}
>
> <cfcomponent>
>
> is there a way to get at y's class object to dynamically add methods like
> this:
>
> function addMethodToComponent(methodName,method,component)
> {
>       component[methodName] = method;
> }
>
> Why would one want to do this you might ask? Well for one thing
> logging all
> access to methods would be simple for a tracing framework etc.
> This type of
> thing is useful when writing frameworks etc. and also for Aspect Oriented
> Development.
>
> Sincerely
> Hardy Jonck
> GMS Software Factory
> www.gmsonline.co.za
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
> in the message of the email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
>
> An archive of the CFCDev list is available at
> www.mail-archive.com/[EMAIL PROTECTED]
>

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to