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 begin with appcelerator for desktop (and use the API's)

hi everybody…I've a bit experience with qt+ and creating not so complex web pages, but I don't know how begin with titanium…when I run the default app this work…I can change the index.html like a web page…I can include javascript code and jquery too…very nice…but when I try run api functions I don't know how include these…in the docs I read things like these:

var win = Ti.UI.createWindow(); var view = Ti.UI.createView({backgroundColor:"red"}); win.add(view); win.open();

I don't know where I've put this code…I try put it inside a javascript but it don't work…I put it inside a function onload but don't work neither…there are any "convention" with the names for the files for this work?…I think this is like create a very dynamic web page but I don't know how work with the api….I see the example "kitchen something" but it wasn't so clear to mee…I see a examples like this:

http://mobile.tutsplus.com/tutorials/appcelerator/appcelerator-using-json-to-build-a-twitter-client/

but seems like this work different when is an ipod to when it is a desktp app…I create an app.js and put my code inside it but it never run…I create a index.js too but it don't work neither

please help..I'm very noob…thanks

— asked November 30th 2010 by angel marq
  • api
  • desktop
  • noob
0 Comments

1 Answer

  • I would recommend the Getting Started with Titanium Desktop Guide as a good starting place.

    After that take a look at the Titanium Desktop Programming Guides

    — answered November 30th 2010 by Aaron Saunders
    permalink
    2 Comments
    • thanks for the reply…I read all this documents but neither talk about how work with the API…I know how modify the tiapp.xml file and I test a app using ruby and python together javascript and works perfect…the problem is then I don't know where have I put the API functions..for examp…if I wanna put a ti.UI.createSearchBar where must I put it??

      I tried put inside a script tag but my file never call it…I put it inside a function too…load when the page render using onload…but don't work…really..It's a very noob question but I've tried many differents ways and no one has worked….

      — commented November 30th 2010 by angel marq
    • there are videos on the web site I would suggest you watch if the documentation is not working for you.

      There is a whole online course here from youtube

      — commented December 1st 2010 by Aaron Saunders
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.