3 Replies Latest reply on Feb 6, 2012 6:08 PM by havefreetime

    I modified sdk, but it's not reflected in outcome.

    havefreetime

      Hi. All.

       

      I wanna edit mx.controls.videoClasses.NCManagerConnectClient.

       

      I inserted the 'receiveMessage' method  into NCManagerConnectClient.abc

       

      8.jpg

      But my app couldn't find the method.

       

      and I can't see the method in Package Explorer.

       

      9.jpg

       

      I restarted eclipse, but it doesnt work.

       

      How can I edit sdk?

       

       

       

       

      Thanks in advanced.

       

      Kevin.

        • 1. Re: I modified sdk, but it's not reflected in outcome.
          GordonSmith Level 4

          > I inserted the 'receiveMessage' method  into NCManagerConnectClient.abc

           

          I assume you meant to say "into NCManagerConnectClient.as".

           

          Flash Builder compiles against a set of precompiled SWC libraries, not agains the source files for these SWCs. The SWC one containing NCManagerConnectClient is probably mx.swc. You need to either recompile mx.swc or "monkey-patch" it. I recommend monkey-patching.

           

          To recompile it, you should in principle be able to use the Ant script frameworks/build.xml, but it looks like that file is out of date and doesn't have a target for building mx.swc. However, the site http://opensource.adobe.com/flex has instructions for building the complete SDK, including all SWCs.

           

          To monkey-patch, put your edited copy of NCManagerConnectClient on the source path for your application, in the subdirectory for its package. This will make it be found instead of the NCManagerConnectClient in the SWC, because classes on the source path have higher precedence than those on the library path.

           

          Gordon Smith, Adobe

          • 2. Re: I modified sdk, but it's not reflected in outcome.
            drkstr_1 Level 4

            Don't modify the framework source unless you are building the entire thing yourself.

             

            You can do what is called a "monkey patch," where you copy the file into your project under the same path, and make any changes to that file instead. The compiler will override the class definition when you build your project.

            1 person found this helpful
            • 3. Re: I modified sdk, but it's not reflected in outcome.
              havefreetime Level 1

              Thanks Gordon and drkstr_1. I'll try~!