0

I have a problem with my Flex Builder Plug-in.

I'm using the Flex Builder 3 Plug-in in my Flex application (in Eclipse).

Now I want to customize the MessageResponder.as File in the Plug-In. I found the ActionScript File without any problems, but the point is, that my changes doesn't cause anything because the file is allready compiled. (That's my guess)

Now my question:

How can I compile the file after editing it? Is there a possibility at all?

Thanks for your help!!

2 Answers2

1

What you want to do is called "Monkey Patching." What you need to do is create your own version of the file in the same package location, and yours will be used in preference to the one from the swc.

Amy Blankenship
  • 6,485
  • 2
  • 22
  • 45
  • The Point with re-building the entire framework sounds exactely like what I'm looking for. Now I have the problem, that I'm a total greenhorn with Flex and creating a new framework, etc. Can you give me a step by step instruction how I can to that? – user2282999 Apr 16 '13 at 14:21
  • Jeffrey is the one who suggested rebuilding the entire framework. I suggested just substituting your own version of the single file. Ask him... – Amy Blankenship Apr 16 '13 at 15:54
0

The MessageResponder.as class is a file in the Flex Framework. You can modify it if you want, and--in essence--create your own version of the Flex SDK. However, you will most likely have to re-buld the entire framework for this to work. You're best bet for doing this is to get the source for the most current Apache Flex SDK; modify your class and then build the framework from scratch. After that you can use the Flash Builder "multi-SDK feature" to use your modified SDK in a Flex Project.

I'm not sure if Flex Builder 3.x supports multiple SDKs.

This may be a time consuming process. The alternative is to extend the MessageResponder and add your changes. Then you'll have to make sure that your new MessageResponder class is used instead of the old MessageResponder class. This could difficult due to many private methods used in the Flex Framework.

JeffryHouser
  • 39,401
  • 4
  • 38
  • 59
  • The Point with re-building the entire framework sounds exactely like what I'm looking for. Now I have the problem, that I'm a total greenhorn with Flex and creating a new framework, etc. Can you give me a step by step instruction how I can to that? – user2282999 Apr 17 '13 at 07:26
  • I can't; sorry. you'll have to look at the readme files distributed with Apache Flex that provide instructions. Honestly, @Amy Blankenship 's Monkey Patching idea is probably a better solution. – JeffryHouser Apr 17 '13 at 12:53