Like the first time you type sudo:
We trust you have received the usual lecture from the local former Flex SDK dev. It usually boils down to these three things:Create an empty preloader class (or add to an existing one) which contains the following, substituting for whatever you're patching.
#1) Respect the privacy of other classes.
#2) Think before you patch.
#3) With great power comes great responsibility.
import mx.managers.FocusManager; FocusManager;And that'll do it. The class will get preloaded, before the cached framework gets loaded. Simple and obvious now, eh?
---
Note: If using RSLs, you may see significant code bloat. Classes get loaded in order of dependency -- if the dependency of UIComponent isn't present when it tries to load, it fails.
So if you are patching high up in the dependency tree, like UIComponent, all the required classes will get compiled into the main SWF, as they are loaded before the RSLs.
Notably, this is unlike how Java's class loader works.
No comments:
Post a Comment