tschneidereit / SwiftSuspenders

NOTE: Find the offical repo at http://github.com/robotlegs/swiftsuspenders
https://github.com/robotlegs/swiftsuspenders
MIT License
280 stars 89 forks source link

Error when injecting named ArrayCollection #6

Closed darscan closed 14 years ago

darscan commented 14 years ago

Try: injector.mapValue(ArrayCollection, ac, "somename");

[Inject(name="somename")] public var ac:ArrayCollection;

tschneidereit commented 14 years ago

Wow, that's unbelievably fucked up. Turns out that you just can't call object.constructor on classes inheriting from flash.utils.Proxy. time for yet another workaround ...

tschneidereit commented 14 years ago

Ok, found and implemented a fix with bearable overhead

darscan commented 14 years ago

Legend!

texastoland commented 14 years ago

Reflector#getClass needs this fix too. Refatored yours to an internal package level method available to both and also implemented ApplicationDomain:

https://gist.github.com/a3322dc3e3cc697d6fbe