Try adding a high priority handler to the top-level window that parents that 
scroller

    topLevelWindow.addEventListener(FlexEvent.HIDE, hideEventFilter, true, 100);


On 6/22/10 9:19 AM, "Stephane Guyot" <stephane.guyo...@wanadoo.fr> wrote:


Alex,

I've added  systemManager.addEventListener(FlexEvent.HIDE, hideEventFilter, 
true)
on the top-level window  placed in a PopUpAnchor ( and  containing checkboxes, 
legends , group,  scroller)  and try to stop  HIDE event,  causing troubles in 
FocusManager.
This tips prevents many  exceptions, I see it in logs ..., but sometimes 
SparkSkin of a scroller still produce the exception :-/
I don't undertand why, the scroller is in the displayList of the top 
level-window but i'm not listening the Hide event, and then don't do 
stopImmediatePropagation.

One more idea ?

Thanks,
Stephane


TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la 
méthode d'une référence d'objet nul.

       at 
mx.managers::FocusManager/childHideHandler()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\FocusManager.as:1759]

       at flash.events::EventDispatcher/dispatchEventFunction()

       at flash.events::EventDispatcher/dispatchEvent()

       at 
mx.core::UIComponent/dispatchEvent()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:12528]

       at 
mx.core::UIComponent/setVisible()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:3088]

       at mx.core::UIComponent/set 
visible()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:3047]

       at spark.components.supportClasses::ScrollerLayout/set 
vsbVisible()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\supportClasses\ScrollerLayout.as:189]

       at 
spark.components.supportClasses::ScrollerLayout/updateDisplayList()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\supportClasses\ScrollerLayout.as:448]

       at 
spark.components.supportClasses::GroupBase/updateDisplayList()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\supportClasses\GroupBase.as:1224]

       at 
spark.components::Group/updateDisplayList()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\Group.as:899]

       at 
spark.skins::SparkSkin/updateDisplayList()[E:\dev\4.x\frameworks\projects\spark\src\spark\skins\SparkSkin.as:191]

       at 
mx.core::UIComponent/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8709]

       at 
mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:663]

       at 
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:736]

       at 
mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1072]



Just do it :  http://www.kiva.org/lender/stephane4127

Le 18 juin 2010 à 19:05, Alex Harui a écrit :

Try adding a capture phase listener to systemManager.

    systemManager.addEventListener(FlexEvent.HIDE, hideEventFilter, true);

    private function hideEventFilter(event:FlexEvent):void
    {
        if (event.target.stage == null)
            event.stopImmediatePropagation();
    }


On 6/18/10 2:56 AM, "Stephane Guyot" <stephane.guyo...@wanadoo.fr 
<x-msg://915/stephane.guyo...@wanadoo.fr> > wrote:


Alex,

yes the ViewStack is newly destroyed.
I use PopUpAnchor to show/hide Chart Legend, the bug is not clearly 
reproductible, somtimes it appears, sometimes no trouble.

I'm still looking for a workaround. What should i do ? Replace PopUpAnchor and 
use PopUpManager ?
Is it possible to plug my own FocusManager and a try/catch to hide the 
exception ?

ViewStack, CheckBox and this morning I've got a new version with Group :

TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la 
méthode d'une référence d'objet nul.

        at 
mx.managers::FocusManager/childHideHandler()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\FocusManager.as:1759]

        at flash.events::EventDispatcher/dispatchEventFunction()

        at flash.events::EventDispatcher/dispatchEvent()

        at 
mx.core::UIComponent/dispatchEvent()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:12528]

        at 
mx.core::UIComponent/setVisible()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:3088]

        at mx.core::UIComponent/set 
visible()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:3047]

        at spark.components.supportClasses::ScrollerLayout/set 
hsbVisible()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\supportClasses\ScrollerLayout.as:105]

        at 
spark.components.supportClasses::ScrollerLayout/updateDisplayList()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\supportClasses\ScrollerLayout.as:429]

        at 
spark.components.supportClasses::GroupBase/updateDisplayList()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\supportClasses\GroupBase.as:1224]

        at 
spark.components::Group/updateDisplayList()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\Group.as:899]

        at 
spark.skins::SparkSkin/updateDisplayList()[E:\dev\4.x\frameworks\projects\spark\src\spark\skins\SparkSkin.as:191]

        at 
mx.core::UIComponent/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8709]

        at 
mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:663]

        at 
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:736]

        at 
mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1072]

        at flash.utils::Timer/_timerDispatch()

        at flash.utils::Timer/tick()



Stephane

Just do it :  http://www.kiva.org/lender/stephane4127

Le 16 juin 2010 à 18:32, Alex Harui a écrit :




This indicates that the viewstack is not on stage.  Is it being newly created 
or destroyed?


On 6/16/10 1:02 AM, "Stephane Guyot" <stephane.guyo...@wanadoo.fr 
<x-msg://915/stephane.guyo...@wanadoo.fr>  
<x-msg://825/stephane.guyo...@wanadoo.fr 
<x-msg://825/stephane.guyo...@wanadoo.fr> > > wrote:






Hi list,

working with Flex 4, I'm looking for a workaround for a very annoying bug :  
http://bugs.adobe.com/jira/browse/SDK-26273

TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la 
méthode d'une référence d'objet nul.

        at 
mx.managers::FocusManager/childHideHandler()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\FocusManager.as:1759]

        at flash.events::EventDispatcher/dispatchEventFunction()

        at flash.events::EventDispatcher/dispatchEvent()

        at 
mx.core::UIComponent/dispatchEvent()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:12528]

        at 
mx.core::UIComponent/setVisible()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\UIComponent.as:3088]

        at 
mx.containers::ViewStack/commitSelectedIndex()[E:\dev\4.x\frameworks\projects\framework\src\mx\containers\ViewStack.as:1201]



Sometimes the bug appears for ViewStack, CheckBox .... working with Flex 
charting components I'm in a hybrid world, spark and halo ....

Any suggestions are wellcome,
Stephane

Just do it :  http://www.kiva.org/lender/stephane4127






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui

Reply via email to