Adobe AIR的:滚动抛出错误时的变化集中在不同应用之间 [英] Adobe Air: scroller throws error when changes focus between different applications

查看:230
本文介绍了Adobe AIR的:滚动抛出错误时的变化集中在不同应用之间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at spark.components::Scroller/focusInHandler()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Scroller.as:2139]
    at flash.display::Stage/set focus()
    at mx.core::UIComponent/setFocus()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:9905]
    at spark.components::RichEditableText/setFocus()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\RichEditableText.as:3126]
    at spark.components.supportClasses::SkinnableTextBase/setFocus()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableTextBase.as:1874]
    at mx.managers::FocusManager/activateWindowHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\FocusManager.as:740]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:13152]
    at spark.components::WindowedApplication/nativeWindow_activateHandler()[E:\dev\4.y\frameworks\projects\airspark\src\spark\components\WindowedApplication.as:2739]

在我Adobe AIR的程序,我得到了上面的错误,当我用我的应用程序,并切换重点围绕这个应用程序和其他应用程序之间。 (我试过好几次,这个错误是重复的。)

In my Adobe Air program, I got the above error, whenever I use my app, and switch focus around between this app and other applications. (I've tried several times and this error is reproducible.)

是什么原因导致这个问题,如何解决它?

What causes this problem and how to fix it?

编辑:我的节目具有stackview和stackviews之一具有一个列表。此错误上面时,列表具有在至少一个对象将发生

my program has a stackview, and one of the stackviews has a list. This error above will occur when the list has at least one object in.

推荐答案

我有同样的问题,在我的项目之一,看起来就像是的的SDK-29522相对=nofollow>已知的bug。在我来说,我只是写了自定义滚轮类,其中添加的FocusManager!= NULL检查。类似于

I've got the same problem in one of my projects and looks like it's known bug of SDK. In my case I just wrote custom Scroller class where added focusManager != null check. Something like

package components
{
    import flash.events.FocusEvent;
    import spark.components.Scroller;
    public class MyScroller extends Scroller
    {
        public function MyScroller()
        {
            super();
        }

        override protected function focusInHandler(event:FocusEvent):void
        {
            if(focusManager != null) {
                super.focusInHandler(event);
            }
        }
    }
}

最好的regrads,罗马

Best regrads, Roman

这篇关于Adobe AIR的:滚动抛出错误时的变化集中在不同应用之间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆