Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org.as3commons.reflect.Type.isDynamic wrong? #32

Closed
GoogleCodeExporter opened this issue Nov 6, 2015 · 3 comments
Closed

org.as3commons.reflect.Type.isDynamic wrong? #32

GoogleCodeExporter opened this issue Nov 6, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.create an class
2.new instance this class ,and then flash.utils.describeType(instance),I get 
something like:
<type name="net.kentop.uirenderer.form::ItemDefine" base="Object" 
isDynamic="false" isFinal="false" isStatic="false">
where isDynamic is false.
3.use Type.forInstance(instance),I got type.isDynamic is true.

What is the expected output? What do you see instead?

When var type:Type = Type.forInstance(instance); The type.isDynamic should be 
false ,but I got true.

I have make a test:

When I flash.utils.describeType(Clazz),I got below:
<type name="net.kentop.uirenderer.form::ItemDefine" base="Class" 
isDynamic="true" isFinal="true" isStatic="true">

where base is "Class" ,and isDynamic is true.

describeType(instance) and describeType(clazz) aren't same thing. am i right?


btw : thanks you all . you are doing an good job

Original issue reported on code.google.com by 601...@qq.com on 15 Nov 2010 at 3:37

@GoogleCodeExporter
Copy link
Author

When I continue research this Issue,I found :

var describe:XML = flash.utils.describeType(target);
var isDynamic:Boolean = (describe.@isDynamic as String) == "true";

describe.@isDynamic is XMLList , but not "Boolean".

Original comment by 601...@qq.com on 15 Nov 2010 at 4:14

@GoogleCodeExporter
Copy link
Author

Hi,

I've briefly investigated this issue and have found that describeType doesn't 
always return reliable data. For instance, one of the test classes is called 
'ComplexClass' and its class declaration look like this:

public class ComplexClass

Yet, when I trace the unit tests I see this XML return by describeType():

<type name="org.as3commons.reflect.testclasses::ComplexClass" base="Class" 
isDynamic="true" isFinal="true" isStatic="true">

That seems to be all wrong, right? Maybe this is a problem with the flashplayer 
I'm using? I have no idea what's going on here, but it seems to be all wrong.

Original comment by ihatelivelyids on 25 Nov 2010 at 2:05

@GoogleCodeExporter
Copy link
Author

I'm changing the status of this bug to 'Won't fix' since the data retrieved 
from the native describeType() is faulty. Unfortunately there's nothing we can 
do about that.
The as3commons-reflect library has however been augmented with the new 
describeTypeJSON support. It seems that this native method does yield the 
correct data. This will only be available in flashplayer 10.1 and higher 
though. (Since from that versionb the describeTypeJSON method was exposed)

Original comment by ihatelivelyids on 11 Jan 2011 at 12:02

  • Changed state: WontFix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant