Problem with bindings inside fragments RRS feed

  • Question

  • Hi,

    I'm having a problem with bindings where sometimes things don't get bonded.

    loadMyPage: function(name) { pageContent.innerHTML = ""; WinJS.UI.Fragments.renderCopy("/html/myPage.html", pageContent).done(function () { WinJS.UI.processAll(pageContent).then(function () { WinJS.Resources.processAll(pageContent); MyApp.MyPage.initialize(pageContent, name); }); }); }

    And that initialize function is in the myPage.js which is included by myPage.html:

    function initialize(element, name) {
      WinJS.Binding.processAll(element, { onTextChanged: onTextChanged, onAddName: onAddName, onClose: onClose});

    The problem is that sometimes the bindings work but sometimes they don't.

    Does anyone know why this might be happening?

    Ricardo Sabino --- http://www.ricardosabino.com

    Friday, July 5, 2013 1:28 AM


  • Ended up figuring it out.

    An async callback was doing another Binding.processAll which would override the other one.

    Ricardo Sabino --- http://www.ricardosabino.com

    • Marked as answer by n0n4m3 Tuesday, July 9, 2013 12:35 AM
    Tuesday, July 9, 2013 12:35 AM