Titanium Community Questions & Answer Archive

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

currentWindow

I am not able to use currentWindow.

     det_win = Titanium.UI.createWindow({
        title:e.rowData.title,
        backgroundColor:'#fff',
        translucent:true,
        barColor:'#000'
    });

    det_win.hideNavBar();

more code follows, I'm attaching some views, then open the window.

    index_tab.open(det_win,{animated:true});

if later I try

    Titanium.UI.currentWindow.showNavBar();

is not working, but

        det_win.showNavBar();

works.

Actually I never was able to use currentView and currentWindow.
What I do wrong ?

Thanks

— asked March 22nd 2010 by Dan Tamas
  • 1.0
  • currentwindow
0 Comments

1 Answer

  • Accepted Answer

    Titanium.UI.currentWindow and related properties are only available in the subcontext of a window opened from Titanium.UI.createWindow with a URL to javascript. Inside that JS, you can use Titanium.UI.currentWindow to get to the reference to the window.

    Otherwise in your example, just use you det_win since you already have the reference.

    — answered March 22nd 2010 by Jeff Haynie
    permalink
    1 Comment
    • Can I use the Titanium.UI.currentWindow in a inclueded JS module?

      — commented March 13th 2012 by eric yang
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.