Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19130

Windows: Ti.UI.Window.remove() generates runtime error, view is not removed

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 4.1.0
    • Fix Version/s: Release 4.1.0
    • Component/s: Windows
    • Labels:
      None
    • Environment:

      SDK 4.1.0 beta (4.1.0.v20150626223333)

    • Story Points:
      3
    • Sprint:
      2015 Sprint 13 Windows

      Description

      The following example shows that you cannot remove a view on Windows:

      var win = Ti.UI.createWindow();
       
      var view = Ti.UI.createView({
      	top: 100,
      	width: 100,
      	height: 100,
      	backgroundColor: 'red'
      });
       
      win.add(view);
       
      var btn = Ti.UI.createButton({
      	top: 300,
      	title: 'Click'
      });
       
      btn.addEventListener('click', function (e) {
      	win.remove(view);
      });
       
      win.add(btn);
      win.open();
      

      Log:

      -- Start application log -----------------------------------------------------
      [INFO]  Finished launching the application
      [INFO]  Waiting for app to connect to log relay
      [ERROR] Application Error: "Runtime Error during click event: undefined is not a function (evaluating 'win.remove(view)')"
      

        Attachments

          Activity

            People

            • Assignee:
              cwilliams Christopher Williams
              Reporter:
              fokkezb Fokke Zandbergen
              Reviewer:
              Dawson Toth
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-20075
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code