我正在尝试创建一个简单的工作灯应用程序,但尝试创建一个新Memory
的原因是:
Uncaught TypeError: Cannot read property 'style' of null at mobile-ui-layer.js:378
这似乎很奇怪,因为我不明白创建 Memory 对象与样式有什么关系。
在 Chrome 中调试时,我var testStore = new Memory({data:storeData})
在行之后立即得到它。
require (
["dojo",
"dojo/parser",
"dojo/_base/xhr",
"dijit/form/ComboBox",
"dojo/store/JsonRest",
"dojo/ready",
"dojox/mobile/EdgeToEdgeStoreList",
"dojox/mobile",
"dojox/mobile/parser",
"dojox/io/xhrWindowNamePlugin",
"dojox/io/windowName",
"dojox/io/xhrPlugins",
"dojo/dom-style",
"dojo/dom",
"dojo/dom-class",
"dojo/_base/Deferred",
"dojo/store/Memory"], function(JsonRestStore, EdgeToEdgeStoreList, xhrPlugins, Memory) {
storeData = [
{ "label": "Wi-Fi", "icon": "images/i-icon-3.png", "rightText": "Off", "moveTo": "bar" },
{ "label": "VPN", "icon": "images/i-icon-4.png", "rightText": "VPN", "moveTo": "bar" }
];
var testStore = new Memory({data:storeData});
var testList = new dojox.mobile.EdgeToEdgeStoreList({store:testStore}, "testList");
storeList.startup();
});
供参考:这是worklight 5.0.5