the bald man speaketh
Thanks for this. I think most advanced developers understand the concept of Injection, but it's very interesting to see a simple implementation of it! Great video.
Ditto what Ace said. Been using Swift Suspenders but it's great to see it from scratch.
When I add -keep-as3-metadata+=Inject I'm getting some extra metadata that isn't in your video: __go_to_definition_help and it has two args, file, which is the location to my ViewMediator.as file, and pos. This is messing up the example, because it makes variable.metadata.@name == "Inject__go_to_definition_help". I can still get the example to work by using if (variable.metadata.(@name == "Inject") != undefined), just curious if you know why this extra metadata is there. It looks like it's metadata that Eclipse uses to jump to a definition, just not sure why it's in the .as file.
I honestly have no idea. You could try changing:-keep-as3-metadata+=Injectto-keep-as3-metadata=Inject (remove the "+")so that it might not append any metadata that's trying to be stored from elsewhere? But if you add any additional metadata beyond "Inject", then you'd have to use +=.
After some Googling it seems it's added only for debug builds, and you don't have to use -keep-as3-metadata anymore. Apparently this is new to the Flex 4 compiler.
Cool, thanks for the update.