Knowledge Base: Is Robotlegs Compatible with the Flash IDE (CS3/CS4)
Robotlegs relies on custom metadata (the [Inject] annotations) for its dependency injection. Unfortunately, Flash CS3/ CS4 don't support compiling custom metadata, disabling this way of configuration.
The bundled SwiftSuspenders DI solution provides a way to configure injection points using XML, enabling Robotlegs usage for Flash CS3/ CS4 compiled projects.
To use XML configuration, the context has to initialize the injector with an XML object containing the configuration for your applications' classes. The configuration for Robotlegs classes is then done automatically.
Initializing the injector with XML is done by adding this line
to your context's constructor, before the super()
call:
injector = new
SwiftSuspendersInjector(xmlConfiguration);
Where xmlConfiguration is your XML object.
More information about the configuration options can be found in the SwiftSuspenders README