incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <>
Subject Re: Making a private property public and testing
Date Fri, 22 Jun 2012 18:00:17 GMT

On 6/22/12 2:12 AM, "jude" <> wrote:

> I'm trying to create a basic diagnostic tool that will show all Effects in
> a UI Component class or all effect instances currently running but I'm
> having trouble getting this information.
> In the Effect Manager class there are two properties that would seem to
> help:
> mx_internal static var effectsPlaying:Array
> private static var effects:Dictionary = new Dictionary(true);
> The first looks like what I'm looking for but it, "Keeps track of all the
> triggered effects that are currently playing." This doesn't help much since
> I'm not working with trigger effects.
I think you probably want the Dictionary.
> BTW are they deprecated in Flex 4 or
> was there not enough time to support them?
I think not supporting event triggers was a purposeful decision but I don't
recall the logic behind it.
> The second property contains the effects dictionary where each effect
> registers themselves when they play but it is marked private. Is there
> anyway to get this information?
No.  The dictionary and its access methods are there just to answer the
question if any effect is running at all.  It is used by Mustella.  You will
have to add an API to walk the dictionary if that's what you need.
> Also, I created a local copy of EffectManager and marked the property
> public. However, it's returning undefined and I'm not sure if that's
> something I'm doing. I'm checking in the effect update event so it should
> be in there.
EffectManager.effects is returning undefined? That shouldn't be possible.

> Also, I added a method to get the effects dictionary but when I call that
> method it throws an error, "getEffectsInEffect" is not a function. Is there
> a rule to monkey patching I'm not aware of?
>         public static function getEffectsInEffect():Dictionary
>         {
>             return effects;
>         }
I assume you've turned off RSLs? Otherwise you have to deploy fancier tricks
to inject a monkey-patch of a class in the framework RSL.

Alex Harui
Flex SDK Team
Adobe Systems, Inc.

View raw message