Question

As the title suggests, why are the applyResult and applyFault methods of AsyncToken marked mx_internal?

There have been a few times that I would have liked to use AsyncToken in my code, but I've ended up re-writing it because I don't want to force clients to use namespace mx_internal.

Was it helpful?

Solution

Well, as stated somewhere in the livedocs (I think) mx_internal is used to mark things in the framework that might change over time (apparently they thought C# and Java are doing it wrong with the deprecated stuff). As to the exact reason why those particular methods are marked mx_internal only the developer that marked them knows. They probably met one day to discuss it and it went something like: "Hey. What access do we want for those methods" "I don't know, do we want them to be overridable?" "Not sure" "Ok, let's make them mx_internal then". There were many cases where methods that should have been marked protected were marked mx_internal (or private which is even worse in some cases) instead, and it's one of the most annoying things in the flex framework.

Also, you're using the mx_internal namespace whether you want it or not, because most of the components in the framework import it, so if you use the flex framework components, your build already includes it.

OTHER TIPS

If you'd built this class you'd want to hide the functionality away from normal users, as you don't want them mistakenly invoking the methods, but the internal classes that create them need to invoked them, therefore marking them as mx_internal makes good sense.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top