Answered by:
0x800a138f - JavaScript runtime error: Unable to get value of the property 'offset': object is null or undefined

Question
-
A weird error occurs in ui.js[dynamic], saying Unable to get value of the property 'offset': object is null or undefined in this function
_groupFromOffset: function (offset) { this._updateOffsets(); return offset < this._getGroup(0).offset ? 0 : this._site.groups.groupFromOffset(offset); },
I was trying clear the list variable (WinJS.Binding.List();) in data.js file, once i got the data from service. If i don't do that, i'm not getting that error, So i'm doing something wrong in clearing the list. and repopulating. Here is the code snippet.
var list = new WinJS.Binding.List(); function getHomePageData() { list.forEach(function (item) { list.dataSource.remove(item.key); }); return new WinJS.Promise( function (c, e, p) { WinJS.xhr({ url: "URl" }).then( function (req) { if (req.readyState == 4 && req.status == 200) { var responseXML = req.responseXML.getElementsByTagName('HomePage'); for (var i = 0; i < responseXML.length; i++) { try { //list._currentKey = i; list.push({ group: { key: keydata title: titledata }, }); } catch (exception) { } } c({ results: list }); } }, function (req) { e(req.status); }, function (req) { p(req); }); }); }
So basically what i'm trying to do is, every time it comes in i want to remove the existing and push the latest data.but its all working fine but when i navigate to next page and while coming back to landing page i'm getting that error!! Can some one help me in this?
Friday, January 20, 2012 7:04 PM
Answers
-
Hi Sanders,
Yes it is a expand of winjs.Binding. No worries, i think i don't want to bother about this, coz it does'nt comes on the debug mode and it works fine with win certification.
Thanks
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Monday, January 23, 2012 4:22 PM
- Marked as answer by Matt SmallMicrosoft employee, Moderator Tuesday, January 31, 2012 6:40 PM
Saturday, January 21, 2012 11:36 PM
All replies
-
Hi Rocky,
Is var list = new WinJS.Binding.List(); an expando off of WinJS.Binding that you have created? What is data.js?
I am not familiar with WinJS.Binding.List.
-Jeff
Jeff Sanders (MSFT)- Edited by Jeff SandersMicrosoft employee, Moderator Friday, January 20, 2012 8:04 PM
Friday, January 20, 2012 8:03 PMModerator -
Hi Sanders,
Yes it is a expand of winjs.Binding. No worries, i think i don't want to bother about this, coz it does'nt comes on the debug mode and it works fine with win certification.
Thanks
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Monday, January 23, 2012 4:22 PM
- Marked as answer by Matt SmallMicrosoft employee, Moderator Tuesday, January 31, 2012 6:40 PM
Saturday, January 21, 2012 11:36 PM