GithubHelp home page GithubHelp logo

as3reflect's People

Watchers

 avatar

as3reflect's Issues

MethodInvoker does not work on proxied methods

What steps will reproduce the problem?
1. create a MethodInvoker for invoking a method on a remote object
2. invoke the MethodInvoker

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

- expected: normal execution of the remote call
- actual: no method is found, because Type does not recognize proxied
methods -> don't use type.getMethod()



Original issue reported on code.google.com by christophe.herreman on 26 Jan 2009 at 9:05

Type.forName() contains a trace() call, that cannot be filtered

The application must be able to filter all log entries.

What steps will reproduce the problem?
1. Call Type.forName() for an undefined class. 
2. Observe an unconditional trace log entry.

For example, this happens for classes generated by Flex:

Type.forName error: Error #1065: Variable AuthenticationAgent is not 
defined. The class 'ChannelSet.as$125::AuthenticationAgent' is probably an 
internal class or it may not have been compiled.

This is not really an error, it should be treated as a warning. Instead of 
the trace() call, a logging framework should be used (level "Warn"), so 
that the application can decide if these kind of entries should be 
included in the log.

What version of the product are you using? On what operating system?
as3reflect as of 1-20-09


Original issue reported on code.google.com by [email protected] on 20 Jan 2009 at 7:51

Type.forClass may enter infinite recursion due to describeType() work-around for constructors

See attached patch file for the trunk (as of 3-7-2009 8pm PST).

What steps will reproduce the problem?
1. Run unit test TypeTest#testConstructorRecursionHazard.
2. If the queried class has a constructor that uses Type#forClass 
(directly or indirectly), a stack overflow occurs. This error is caught
by a try...catch block in _getTypeDescription, therefore the issue is not 
observable externally, but in certain situations the stack overflow leads 
to partially or fully empty Type instances.

The attached patch fixes the problem by swapping some statements in 
Type#forClass.

Original issue reported on code.google.com by [email protected] on 8 Mar 2009 at 5:10

Attachments:

hasMetaData method in MetaDataContainer makes the wrong check

hasMetaData () currently has this implementation:

public function hasMetaData(key:String):Boolean {
    return (getMetaData(key) != null);
}

this should be changed to:

public function hasMetaData(key:String):Boolean {
    return (getMetaData(key).length > 0);
}

since getMetaData now always returns an array of metadata for the given
key, and an empty array if the key doesn't exist.

Original issue reported on code.google.com by ihatelivelyids on 25 Jan 2009 at 3:38

Potential solution for classUtils::newInstance(clazz,args)

I came to your as3reflect class in the hopes that you'd have a better
solution for wrapped instantiation of new classes.  Unfortunately, your
code has the same switch mine does (*cries*).

I came across Metal Hurlant's eval() work though, and it got me thinking:
Obviously, an eval() in AS3 would involve an AS3 parser / compiler with AS3
bytecode as the target, then somehow run the AS3 bytecode.

If there's a way to run arbitrary bytecode, then we could, theoretically,
construct the *bytecode* for creating a new instance and execute it, all
within the newInstance function.

So it then occurred to me that one could, theoretically, write the actual
instantiation function in AS3 assembly, were that possible.

Unfortunately, in this investigation, I found that the construct opcode
must have a static byte telling it how many arguments to pull from the
stack.  As such, again, we absolutely HAVE to build the function at
runtime, and execute it.

I'm looking into how the ASC compiler in AS3 executes arbitrary bytecode. 
If I get it working, I intend to share how it's done.

Original issue reported on code.google.com by [email protected] on 15 Mar 2009 at 11:19

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.