Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error in 15.1.9 cannot read property set of null
#1
I have app the runs great both as a exe and dll under 15.0.17. App uses TMS components.
when run as exe under 15.1.9 i get the folllowing errors.

Any idea where to start looking?

Uncaught TypeError: Cannot read property 'set' of null
    at findCssRuleFromSelector (IWCommon__ED5C788A0.js:3281)
    at findCssRule (IWCommon__ED5C788A0.js:3313)
    at internalGetElementCssRule (IWCommon__ED5C788A0.js:3355)
    at getElementCssRule2 (IWCommon__ED5C788A0.js:3397)
    at HTMLSpanElement.IWCL_SetRect [as SetRect] (IWCL__ED5C788A0.js:492)
    at DoUpdateRects (IWCL__ED5C788A0.js:1218)
    at DoAlign (IWCL__ED5C788A0.js:1272)
    at HTMLDivElement.IWCL_UpdateRects [as UpdateRects] (IWCL__ED5C788A0.js:1302)
    at DoUpdateRects (IWCL__ED5C788A0.js:1221)
    at DoAlign (IWCL__ED5C788A0.js:1272)


Actual code from chrome debugger (bold line is what is identifed as error line)

function findCssRuleFromSelector(sheet, selectorName, sheetIdx) {
    var rules = IW.CSS.getCSSRules(sheet);
    if (rules && rules.length) {
        for (var j = rules.length - 1; j >= 0; j--) {
            if (rules[j].selectorText && (rules[j].selectorText === selectorName)) {
                // save it in CSS rule cache
                cssRuleCache.set(selectorName, { sheet: sheetIdx, rule: j });
                return rules[j];
            }
        }
    }
    return null;
}
Reply
#2
What component is that? I guess you are changing it during an async event, right?
Reply
#3
I am using TMS TIWAdvWebGrid
I build a simple hello world app with the grid, and no errors. So I do not believe it is the source of the problem.
I cannot trace into IW code so I am trying commenting out sections of code to try and find the issue.
Was hoping that someone may have seen this same issue
Reply
#4
I'll see what I can find. We can possibly avoid the JS error from IW side, but not sure if whatever the grid is doing in async will work
Reply
#5
(01-31-2020, 09:42 PM)Alexandre Machado Wrote: I'll see what I can find. We can possibly avoid the JS error from IW side, but not sure if whatever the grid is doing in async will work

OK,  I found it.  The last programmer added

ExtraHeader.Add('<script type="text/javascript">function findCssRuleInCache(selectorName) {return null};</script>');

I commented this out and everything now works. I assume this was added to correct an issue in prior Intraweb Version.
Reply
#6
Hum... he probably disabled the rule cache from IW creating a new function with the same name. Makes sense.
Reply
#7
Not knowing what the last programmer was trying to do, Is this somehing I need to worry about?

Thank you for your support.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)