1

我正在使用默认的 1.9 Dojo Toolkit 开发工作灯应用程序。我的应用程序在 Android 模拟器和网络浏览器模拟器中运行良好。我试图在 Windows phone 8 Emulator 中测试相同的应用程序,但我无法看到整个主页。我只能看到按钮上使用的 Tabbar Button 部分,而我看不到页面中使用的列表项。我的问题是 Dojo Toolkit 1.9 是否支持 Windows Phone 8?

我访问了 dojo 1.9 发布链接,它说在 dojo 1.9 中,已包含对 Windows Phone 8 的支持。如果这是真的,我的应用程序在 Windows phone 8 模拟器中失败的原因可能是什么?

当我在 Worklight 项目中创建 Windows phone 8 环境时,我也得到了以下日志。

     [2013-11-12 22:14:08]             Environment 'Windows Phone 8' was created.
     [2013-11-12 22:14:13]             Starting build process: application 'KaiserTestApp', environment 'windowsphone8'
     [2013-11-12 22:14:28]             Windows Phone 8 app may not work well with Dojo toolkit included for this Application.  Use a different Worklight Project, without Dojo toolkit, for Windows Phone 8 apps.
     [2013-11-12 22:14:28]             Application 'KaiserTestApp' with environment 'windowsphone8' build finished.

主页

4

1 回答 1

1

有一个 WP8 VM 错误可能会伤害 ListItem 并可能解释您的问题。要检查你是否陷入这种只是猴子补丁 _ItemBase _setSelectedAttr 方法,看看是否能解决你的问题:

    _setSelectedAttr: function(/*Boolean*/selected){
        // summary:
        //      Makes this widget in the selected or unselected state.
        // description:
        //      Subclass should override.
        // tags:
        //      private
        if(selected){
            var p = this.getParent();
            if(p && p.selectOne){
                // deselect the currently selected item
                var arr = array.filter(p.getChildren(), function(w){
                    return w.selected;
                });
                array.forEach(arr, function(c){
                    this._prevSel = c;
                    c.set("selected", false);
                }, this);
            }
        }
        this.selected = selected;
        //this._set("selected", selected);
    }

如果这可以解决您的问题,请告诉我们,我们将了解如何发布 Dojo 的更新版本,以解决 WP8 WM 错误。

于 2013-12-03T09:15:59.490 回答