Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Window.remove does not work?

Hi everyone,

Is it possible to remove an ImageView from a Window using the window's remove method? I have something like this:

var window = Titanium.UI.createWindow();
var image = Titanium.UI.createImageView({url: myUrl});

window.add(splashNoText);

window.open();

// Some more code here, and then...

window.remove(image);

The final line appears to have no effect, have I misunderstood the purpose of 'remove'?

Thanks,

Toby

— asked September 29th 2010 by Toby Mathews
  • ipad
  • remove
  • window
0 Comments

2 Answers

  • Ah, it does work and I am a fool - some code I omitted from my example was at fault!

    — answered September 29th 2010 by Toby Mathews
    permalink
    0 Comments
  • For other newbies out there like myself, if you create and open (or pop) up a window, then attach multiple views, the easiest way to quickly remove views is to just close the window entirely! ie window.close()

    — answered February 4th 2012 by Kevin Lu
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.