Titanium Community Questions & Answer Archive

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

win.remove(view) does not remove view from screen?

Hi

I need to refresh a window with new information. The way I use is the check if a view is null, if so, remove it using

win.remove(view)

and then create a new view and add it to the windows by

win.add(newview)

However, on the screen, I see both the view and newview superimposed together… why is that so?

Thanks!

— asked March 22nd 2010 by Peter Lum
  • view
  • win.add
  • win.remove
0 Comments

5 Answers

  • If I understand your post correctly, you're checking to see whether a view is null, and if the view is null, you're attempting to remove the view?

    I can't think of any circumstances in which a view that has been added to a window would become null.

    Can you post an excerpt from your code?

    — answered March 23rd 2010 by James K
    permalink
    0 Comments
  • Hello Peter, do you solve your problem?
    I've the same, how can you do that?

    Thanks!

    — answered July 20th 2010 by Gilliard Lopes
    permalink
    0 Comments
  • I'm also having this problem too :) If you could let me know it'd be GREATLY appreciated!

    Thanks,

    Peter

    — answered May 19th 2011 by P Sweeney
    permalink
    0 Comments
  • Nothing? I am having the same problem..

    — answered August 14th 2012 by Bogdan Trusca
    permalink
    0 Comments
  • Found it, simply set object to null after removing it.
    I found the answer here: http://developer.appcelerator.com/question/125476/winremove-function-and-memory-management

    — answered August 14th 2012 by Bogdan Trusca
    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.