Titanium Community Questions & Answer Archive

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

Open a detail view from table view without using tabbar

Hi,

I am new to titanium sdk and trying to create a basic application.
The application is simple with a TableView and on click of table view row the detail view appears.

For opening the detail view window i am using the code below Titanium.UI.currentWindow.open(win , {animated:true});
but it doesn't open the detail view…is there anything wrong in this? please advise.

Let me know if there is other way of doing this.

BTW - here is the complete source <a href = "http://pastie.org/994632">http://pastie.org/994632</a>

Thanks.

— asked June 7th 2010 by Yogesh Agarwal
  • tableview
0 Comments

3 Answers

  • Hi Yogesh,

    There are a couple of potential issues here - the first is that if this code resides in app.js, there is no "current window" yet - that property comes into play when a window is opened with an external URL. Also, to get the automatic push animation when you open a new window, you will need to call open on a tab group or a navigation group (iPhone only):

    var navGroup = Ti.UI.iPhone.createNavigationGroup({
      window:aWindowYouCreate
    });
    
    navGroup.open(anotherWindow);
    
    — answered June 7th 2010 by Kevin Whinnery
    permalink
    0 Comments
  • Kevin - Thank you for this tip

    Here is the piece of code i have updated after Kevin's advise http://pastie.org/996075

    — answered June 8th 2010 by Yogesh Agarwal
    permalink
    0 Comments
  • Kevin - Thank you for this tip

    Here is the piece of code i have updated after Kevin's advise http://pastie.org/996075

    — answered June 8th 2010 by Yogesh Agarwal
    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.