Advertisement
Guest User

Error removing child view

a guest
Feb 24th, 2015
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.29 KB | None | 0 0
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <link rel="stylesheet" type="text/css" href="webix.css" type="text/css">
  6. <script src="
  7. webix.js"></script>
  8. </head>
  9. <body id="app" class="webixapp">
  10. <script>
  11. webix.ready(function(){
  12.   // A simple application with just one multi vies that contains two pages.
  13.   var ui = {
  14.     container: 'app',
  15.     type: 'wide',
  16.     cols: [{
  17.       id: 'multiview',
  18.       animate: false,
  19.       cells: [{ template: 'Page 1' }, { template: 'Page 2' }]
  20.     }]
  21.   };
  22.  
  23.   // Create the application
  24.   webix.ui(ui);
  25.  
  26.   // Show the second view.
  27.   var views = $$('multiview').getChildViews();
  28.   views[1].show();
  29.  
  30.   // Try to remove the first view.
  31.   $$('multiview').removeView(views[0]);
  32.  
  33.   // This causes uncaught TypeError: Cannot read property '$getSize' of undefined
  34.   //  webix.js:1000 webix.protoUI.$getSize
  35.   //  webix.js:160 webix.protoUI.$getSize
  36.   //  webix.js:169 webix.protoUI.$getSize
  37.   //  webix.js:156 webix.protoUI.resizeChildren
  38.   //  webix.js:172 webix.protoUI.resizeChildren
  39.   //  webix.js:156 webix.protoUI.resizeChildren
  40.   //  webix.js:155 webix.protoUI.removeViewwebix_test.html:27 (anonymous function)
  41.   //  webix.js:37 (anonymous function)
  42.   //  webix.js:16 (anonymous function)
  43. });
  44.  
  45. </script>
  46. </body>
  47. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement