History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: PSL-143
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Jens Halm
Reporter: Stephan Partzsch
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Parsley Core

ClassInfo.forInstance produces inconsistent results for Number types

Created: 17/Nov/08 10:18 AM   Updated: 04/Apr/11 05:31 PM
Component/s: None
Affects Version/s: Spicelib 1.1.0
Fix Version/s: Spicelib 1.1.1


 Description  « Hide
var i : int = 5;
var cI1 : ClassInfo = ClassInfo.forInstance(i);
var cI2 : ClassInfo = ClassInfo.forName( getQualifiedClassName(i) );

trace(cI1.name); // → Number
trace(cI2.name); // → int

 All   Comments   Change History      Sort Order:
Jens Halm - 17/Nov/08 07:48 PM
This will probably be difficult to improve, since the inconsistency is in the Flash Player and not in the Spicelib Reflection API.

See this forum thread: http://www.spicefactory.org/forum/viewtopic.php?t=89

I'll see if there is a way to hack an Exception especially for Number types into the forInstance method.

Jens Halm - 10/Jan/09 02:56 PM
Slightly improved. Results are now consistent for forInstance and forName, but you still will never get uint as the resolved class.