0 Replies Latest reply on Apr 12, 2009 4:40 PM by wvxvw

    [Q] Faking SystemManager / grabbing -services info.

    wvxvw Level 1

      I've been trying to do this for a few days now with no luck...

      My goal is:

      when I pass -services "myServices.xml" to the compiler when compiling non-framework project to get the data from the "myServices.xml".


      This data is written into autogenerated {AppFileName}_mx_core_Application.as-generated file like this:


      ServerConfig.xml =


      I can fake ServerConfig class, I can also fake SystemManger up to the certain extent, but unless I compile it with SystemManager from SDK's SWC it won't put that little piece of code into frame #2.


      I've tried this:




      And having some dummy mx.managers.SystemManager in the local class-path did the trick... for most part, but even if I remove the framework.swc from it's path (and replace it with the "shortened version" of maybe 10 classes that are needed to support binding, embedding and such) it would still compile the entire framework into my project!

      I tried restarting FCSH, rebooting, crearing all possible cache, but it would find the framework classes and compile them into project.

      So, this way is probably a dead-end...


      On the other hand, I tried to compile completely unrelated to the framework project with -services option. And, I can confirm that the size of the SWF compiled with and without this option is different, but, this information isn't stored as some string data or meta data of any sort... so, finding it in the compiled SWF (assuming it is there) would be a headache...


      So, if you happen to know about how can I tell the compiler which properties should be written into autogenerated classes and how should it call them

      (SystemManager#inf() is also a subject of further investigation...) You'd be golden

      Thanks for taking your time reading this.