christophe-hall / as3-commons

Automatically exported from code.google.com/p/as3-commons
0 stars 0 forks source link

Parameter name and default value missing from org.as3commons.reflect.Parameter #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I've noticed that Parameter object does not indicate the name of the parameter.

The only identification provided comes from the Parameter#index property.  
Also, while the Parameter#isOptional property does imply that the parameter has 
a default value, the default value itself is not provided.

Are these limitations of the ActionScript type information or of the 
as3-commons-reflect library?  If the latter, please consider this a feature 
request to support providing the name and default value of parameters.

Original issue reported on code.google.com by idontneedthisacct@gmail.com on 27 Jan 2011 at 9:46

GoogleCodeExporter commented 8 years ago
as3-commons-reflect is badically a wrapper for the XML returned by the 
describeType() method. This information is indeed rather limited and will, 
amongst others, not return parameter names or default values.
The only way to retrieve this information is to use Bytecode based reflection 
available in the as3commons-bytecode library.

Original comment by ihatelivelyids on 28 Jan 2011 at 12:07

GoogleCodeExporter commented 8 years ago
I wasn't clear about it in the original description, but I am indeed using 
Parameter objects obtained via ByteCodeType.

So...  ah.  Your comments made me look deeper.  It wasn't obvious at first that 
the Parameter objects returned by instances ByteCodeType where actually 
instances of ByteCodeParameter (derived from Parameter).  This gives me the 
information I want!

This library is great...  fabulous. :)  However, I would suggest some time be 
spent on fleshing out the AsDocs and writing some tutorials.  Thanks.

Original comment by idontneedthisacct@gmail.com on 28 Jan 2011 at 1:27