Question

Does anyone know if it is possible to inject into a regular as3 (non mxml) class? I've tried with limited success. Thanks

Was it helpful?

Solution

Could you be more specific? There's no difference between an "MXML" class and a class defined in ActionScript, it's just different ways of writing the same thing.

All that is needed for injection to work is a source property that is bindable and a destination property that is public (either a public setter or a public instance variable). If those two requirements are met and the code compiles it should work.

Look at the code for the example application you can find here: http://code.google.com/p/mate-examples/wiki/DocumentBasedExampleIntro and you will find a ton of injectors that target classes not defined using MXML (look for injectors targeting classes whose names end in "Model" especially). You can also find countless examples in the Mate forums.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top