Titanium Community Questions & Answer Archive

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

Global context / switching windows?

I have a series of windows in a TabGroup. From within one of the windows I'd like to switch to another window.

That is: I have app.js where the tabgroup is defined. One of the windows is implemented in login.js where the user can provide their username/password and login. I'd like to switch from login.js to the main window (implemented in main.js). I don't seem to have access to the variables defined in app.js .

What's the general pattern for doing this?

— asked September 29th 2010 by Parand Darugar
  • mobile
1 Comment
  • hi Parand,
    I'm developing the application which having the same windows like yours and want to switch between them. and I use win.close() and win.open(). You can try it.

    — commented June 25th 2011 by subhan yzu

1 Answer

  • Hello,

    I don't know whether this will help you, but if 1 window = 1 tab in your app, you can always use something like 'tabGroup.setActiveTab(x)' where x is the number of the tab you want to activate.

    Best regards,

    Laurent

    — answered June 26th 2011 by Laurent Jolia-Ferrier
    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.