Is it possible to set method attributes manually.
No. The method attributes are processed at compile time and, whilst they are available as metadata at runtime, changing the metadata does not change the behavior of the entity.
Also for component Y:
...
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; }
Yes, this you can do (because functions are just attributes of the component instance):
this[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.
It won't work, I'm afraid. When you try to replace the method, it will no longer no about the original method you were trying to call so you will not be able to inject the tracing code (which is what I suspect you're trying to do).
Sean A Corfield -- http://www.corfield.org/blog/
"If you're not annoying somebody, you're not really alive." -- Margaret Atwood
----------------------------------------------------------
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]
