• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Appcelerator titanium
 

Appcelerator titanium

on

  • 1,986 views

A

A

Statistics

Views

Total Views
1,986
Views on SlideShare
1,986
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Appcelerator titanium Appcelerator titanium Presentation Transcript

    • Appcelerator Titanium Eller hur man skriver javascript och väntar på att det kompileras, typ.måndag den 7 mars 2011
    • Objekt? Titanium.UI.createTabGroup({ TabGroup() id:tabGroup1 }); 1 * Window() Titanium.UI.createWindow(); 1 * Titanium.UI.createView({ id:viewquestion, View() url:fil.js }); * * Widget() Titanium.UI.createButton();måndag den 7 mars 2011
    • Filstruktur? GLHF! FÖRSLAG? - Ruby on rails Titanium.include(”views/questions/new.js”); var new_question = Titanium.UI.createView({ id: newquestion, url: views/questions/new.js, height: 500, width: 100 });måndag den 7 mars 2011
    • EventListeners! var xhr = Titanium.Network.createHTTPClient(); var title = Titanium.UI.createTextField(); var question = Titanium.UI.createTextArea(); var author = Titanium.UI.createTextField(); var submit = Titanium.UI.createButton({ title: Skicka! }); submit.addEventListener(click,function(){ data = { "headerInput":title.value, "textInput":question.value, "nameInput":author.value }; Titanium.API.info(JSON.stringify(data)); xhr.open(POST, "http://localhost:8888/wtfisthis/api/?resource=questions"); xhr.send(data); });måndag den 7 mars 2011
    • Problem? app.js instansierar och håller koll på allt Globala variabler Finlir med javascript = svårt! Ingen hjälp med struktur!måndag den 7 mars 2011
    • Gitignore?måndag den 7 mars 2011
    • Är WebViews app.js lösningen? navGroup=.... Ti.App.addEventListener(callbackUpdateForm, callbackUpdateForm); signupWebView = Ti.UI.createWebView({url: "screens/signup.html"}); var signupWin = Ti.UI.createWindow({title: "SignUp",barColor: #111}); . signupWin.add(signupWebView); navGroup.open(signupWin,{animated:true}); . function callbackUpdateForm(passedData){ var s = "document.signup.q.value=Test; document.signup.submit();"; signupWebView.evalJS(s); } screens/signup.html signup.html: <form name=signup action="signup2.html" method="POSt" onsubmit="return process()"> </form> <script> function process(){ Ti.App.fireEvent(callbackUpdateForm, {}); </script>måndag den 7 mars 2011
    • måndag den 7 mars 2011