suuhas / as3-commons

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

Type generates stack trace error for bindable properties in Flex #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a bindable property of a custom type in Flex Builder (Flash Builder)
2. Call Type.forClass() method on that Type
3. See stack trace error.

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

This happens because when a property is marked [Bindable], the Flex
preprocessor inserts an Event (PropertyChangeEvent). Event has non
defaulted arguments in the constructor, and for some reason those are not
making it into the parsed arguments.

---------

Message: Error #2007: Parameter type must be non-null.
Stack trace: TypeError: Error #2007: Parameter type must be non-null.
    at flash.events::Event()
    at
org.as3commons.lang::ClassUtils$/newInstance()[/Users/evan.gifford/Documents/Fle
x
Builder 3/AS3Commons_Lang/src/org/as3commons/lang/ClassUtils.as:309]
    at
org.as3commons.reflect::Type$/getTypeDescription()[/Users/evan.gifford/Documents
/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:223]
    at
org.as3commons.reflect::Type$/forClass()[/Users/evan.gifford/Documents/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:138]
    at
org.as3commons.reflect::Type$/forName()[/Users/evan.gifford/Documents/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:108]
    at TypeXmlParser$/parseParameters()[/Users/evan.gifford/Documents/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:672]
    at
TypeXmlParser$/parseMethodsByModifier()[/Users/evan.gifford/Documents/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:660]
    at TypeXmlParser$/parseMethods()[/Users/evan.gifford/Documents/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:635]
    at
org.as3commons.reflect::Type$/forClass()[/Users/evan.gifford/Documents/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:148]
    at
org.as3commons.reflect::Type$/forInstance()[/Users/evan.gifford/Documents/Flex
Builder 3/AS3Commons_Reflect/src/org/as3commons/reflect/Type.as:83]
    at
org.as3commons.xstream.mapper::Mapper$/resolveTypeByReflection()[/Users/evan.gif
ford/Documents/Flex
Builder 3/AS3Commons-XStream /src/org/as3commons/xstream/mapper/Mapper.as:17]
    at
org.as3commons.xstream.converters.reflection::ReflectionConverter/map()[/Users/e
van.gifford/Documents/Flex
Builder 3/AS3Commons-XStream
/src/org/as3commons/xstream/converters/reflection/ReflectionConverter.as:58]
    at
org.as3commons.xstream.converters.reflection::ReflectionConverter/fromXML()[/Use
rs/evan.gifford/Documents/Flex
Builder 3/AS3Commons-XStream
/src/org/as3commons/xstream/converters/reflection/ReflectionConverter.as:43]
    at
org.as3commons.xstream.core::XMLToAS$/objectFromXML()[/Users/evan.gifford/Docume
nts/Flex
Builder 3/AS3Commons-XStream /src/org/as3commons/xstream/core/XMLToAS.as:32]
    at
org.as3commons.xstream.converters.basic::ArrayConverter/fromXML()[/Users/evan.gi
fford/Documents/Flex
Builder 3/AS3Commons-XStream
/src/org/as3commons/xstream/converters/basic/ArrayConverter.as:19]
    at
org.as3commons.xstream.core::XMLToAS$/objectFromXML()[/Users/evan.gifford/Docume
nts/Flex
Builder 3/AS3Commons-XStream /src/org/as3commons/xstream/core/XMLToAS.as:32]
    at
org.as3commons.xstream::XStream/fromXML()[/Users/evan.gifford/Documents/Flex 
Builder
3/AS3Commons-XStream /src/org/as3commons/xstream/XStream.as:33]
    at LAB_BigList/xmlLoaderComplete()[/Users/evan.gifford/Documents/Flex
Builder 3/LAB_BigList/src/LAB_BigList.mxml:33]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

Original issue reported on code.google.com by evangiff...@gmail.com on 26 Oct 2009 at 6:23

GoogleCodeExporter commented 9 years ago
Since this error occurs within a try/catch it is lower priority

Original comment by evangiff...@gmail.com on 26 Oct 2009 at 6:24

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The traces are shown because of a work-around for a flash player bug that 
doesn't
return the right constructor arguments for a describeType call the first time 
around,
calling the constructor without arguments forces describeType() to return the 
right
values, hence the error traces.

Original comment by ihatelivelyids on 21 Mar 2010 at 2:57