Application.pane not set

2 posts, 0 answers
  1. Matt
    Matt avatar
    3 posts
    Member since:
    May 2013

    Posted 21 Jun 2013 Link to this post

    Hi,

    I've just updated my version of Kendo UI to the latest commercial version.

    I'm using the same application pattern as used in the Kendo Mobile Music Store (require.js, one js file per view).
    I'm not sure if this has changed, but the initialisation of Application.pane now seems to occur after startup:-
    $(function(){
        that.element = $(element ? element : document.body);
        that._setupPlatform();
        that._setupElementClass();
        that._attachHideBarHandlers();
        that.pane = new Pane(that.element, that.options);
        that._attachMeta();
     
        if (that.options.updateDocumentTitle) {
            that._setupDocumentTitle();
        }
     
        that._startHistory();
    });
    That means that anything that uses Application.pane (utils.redirect, utils.showLoading) on a "show" call from my initial view crashes thus:-

    Uncaught TypeError: Cannot read property 'history' of undefined scripts/utils.js:54
      redirect  scripts/utils.js:54
    Please let me know if you can help, or if I can provide further information.

    Matt
  2. Petyo
    Admin
    Petyo avatar
    2444 posts

    Posted 25 Jun 2013 Link to this post

    Hi Matt,

    I am not sure what goes on in your case. The application initialization has always been inside a document.ready event handler. The view instantiations (and the triggering of their event handlers) happen afterwards - the _startHistory method starts that, to be more precise. Can you please isolate the problem in a jsbin sample? We will take a look. 

    Regards,
    Petyo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top