Titanium Community Questions & Answer Archive

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

how to transfer data from one window to another

For I Phone development using Titanium

In a Tab, Suppose we have 4 Rows, names as Name, Age, Sex, Submit. When I click in Name Row, popup opens and I enter a name, similarly I do for Age and Sex.

After entering Name , Age and Sex, when I click the submit button, I need to submit this data to the data base.How to transfer this data from one window to another and save this data.

If you can demonstrate this by coding, that would be great.

Thanks,
Jagdeep

— asked May 24th 2010 by Jagdeep Narang
0 Comments

3 Answers

  • look in the kitchensink examples. Try 'custom_propierties.js' to see how you can send/retrieve variables between windows.

    — answered May 24th 2010 by Awesome Dude
    permalink
    0 Comments
  • I've also been using properties to get/set data between windows. From app.js, you are supposed to be able to make variables and functions available to child windows, though I haven't been able to get that to work.

    Read about passing data at the bottom of the api doc for the window object. https://developer.appcelerator.com/apidoc/mobile/1.3/Titanium.UI.Window-object

    Kind of an odd place for those notes, but very useful information.

    — answered May 25th 2010 by Curtis Olson
    permalink
    0 Comments
  • I have been using app properties.

    For example, for integer, you can use setInt or getInt.

    Check out:
    https://developer.appcelerator.com/apidoc/mobile/1.3/Titanium.App.Properties-module

    The strategy is to the value before opening/jumping to a new window. And when the new window open, reads in the value.

    — answered May 25th 2010 by Peter Lum
    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.