While spelunking through the compiler generated code and some blog posts about the bootstrapping that a Flex application performs I stumbled upon another way to force your class to be linked.
There's an undocumented metadata tag called [Frame] which you can use like this:
What you can do is add one dummy class to your class library and just add a whole list of those [Frame(extraClass=""] tags above it.Code:package com.myclasses { [Frame(extraClass="com.myclasses.SomeOtherClass")] public class MyClass { } }
That way you only have to import one class in your application to include a whole list of them.
So, this means you STILL need to add extra code to for the forced linkage, so this is just another way of getting the same results...
Anyways, maybe somebody was interested in reading about this
Cheers,
Roland
P.S. And of course, this tag is undocumented, so it might be subjected to change in future versions of Flex, so watch your step.



Reply With Quote