1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    13
    Vote Rating
    0
    lelit is on a distinguished road

      0  

    Default Error raised when opening a new window in ExtTop

    Error raised when opening a new window in ExtTop


    With ExtJS 4.2.0.265, trying to open any window in the ExtTop example raises an error about “win.dd is undefined”. It worked well under previous beta version.

    Effectively the “createWindow()” method of the Desktop class registers a listener on “boxready”:

    Code:
            win.on({
                boxready: function () {
                    win.dd.xTickSize = me.xTickSize;
                    win.dd.yTickSize = me.yTickSize;
    
                    if (win.resizer) {
                        win.resizer.widthIncrement = me.xTickSize;
                        win.resizer.heightIncrement = me.yTickSize;
                    }
                },
                single: true
            });
    and under the beta2 the event gets triggered before the DD machinery has been configured (I guess by the “initDraggable()” method of the Window class). With the beta1 version, at that point both the “dd” property and the “resizer” property are assigned.

    Don't know what the proper fix should be, apparently just hooking on the “show” event works ok.

    Thank you in advance,
    bye, lele.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,049
    Vote Rating
    657
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 1