titanium-mobile

Does .jss feature is not supported in Titanium mobile SDK

放肆的年华 提交于 2019-12-13 05:23:47
问题 I am trying to use .jss. but i dont know why it is not working. I have a mywindow.js file and i have created a mywindow.jss file. in mywindow.jss file #b { width: 40; height: 50; color: '#324f85'; font: {fontFamily: 'Helvetica-Bold', fontSize: 15}; } in mywindow.js var myButton = Titanium.UI.createButton({ id : "b", title: 'clickME' }); I dont know what i am doing wrong here. Both .js and .jss file are in same location. Using sdk 1.8.1 回答1: Whenever you change (or create) any JSS classes, you

Titanium Saving the state of the last window viewed

社会主义新天地 提交于 2019-12-13 05:01:32
问题 How would i go about saving the state of the last viewed window of my application? I have been trying titanium.app.properties with no luck. I am using MVC so everything is split up into separate files. Would I go about this by making a couple of global variables in the model, and calling them with app.properties? If you can help, could you please provide an example? Thanks for any help <3 回答1: when the app launches i.e with $.index.open() save a property i.e Ti.App.Properties.setString(

Titanium view being pushed up when keyboard shows up

∥☆過路亽.° 提交于 2019-12-13 03:48:42
问题 I have a window (vertical layout) that looks like this: -Window -View1 -View2 -ScrollView1 -ScrollView2 -TextArea (contained in the scrollView2) When I focus in on the textarea the keyboard comes up, but when this happens View1 and View2 scroll up and out of the window. So it looks like this now: -Window -ScrollView1 -ScrollView2 -Textarea -Keyboard I need these two views to stay put and only have the content inside scrollView1 and scrollView2 ( scrollView2 because it contains the textarea

Titanium - Passing Variable to new window

笑着哭i 提交于 2019-12-13 02:50:57
问题 I am having a problem passing variables in my iphone titanium App. Below is my AppTabGroup.js file. There is an event listener called 'grantEntrance'. When this is fired I need the variables event.name and event.email passed to all the new tabs. For some reason this is not working for me. I end up getting undefined errors. I think my question is how do I set global variables? Like event.name so it shows up anywhere in the application. function AppTabGroup() { //declare module dependencies var

adding customized parameters to pass as json

岁酱吖の 提交于 2019-12-13 02:35:48
问题 I am sending the parameters using post method to my rails server using this code in titanium- if (email.value != '' && password.value != '') { loginReq.open("POST","http://192.168.0.187:3000/users/sign_in"); var params = { email: email.value, password: password.value }; loginReq.send(params); } On rails server side I am getting this output on console - Parameters: {"password"=>"[FILTERED]", "email"=>"abcdefgh@gmail.com"} But I need the output like this - Parameters: {"user"=>{"email"=>

Sending email through Appcelerator Cloud API

你说的曾经没有我的故事 提交于 2019-12-12 18:46:53
问题 I was trying to send email through Appcelerator Cloud Service, in my Titanium app. The code I'm using is the standart one, given at the documentation site. But the email is not being sent. Cloud.Emails.send({ template: 'welcome', recipients: '*******@gmail.com' }, function (e) { if (e.success) { Titanium.API.info('Email sent successfully.'); } else { Titanium.API.info('Error:\\n' + ((e.error && e.message) || JSON.stringify(e))); } }); It give the this error, 'Email template welcome is not

Appcelerator Titanium: Code Sign error: No codesigning identities found

心不动则不痛 提交于 2019-12-12 10:55:49
问题 This is driving me crazy, I have spent about 10 hours now deleting and regenerating Apple keys and provisioning profiles for my Appcelerator Titanium iPad app. I had this all working and compiling 1 year ago, then my Mac crashed and I had to reformat and start over. I cannot get past this error: "Code Sign error: No codesigning identities found (i.e. certificate and private key pairs) that match the provisioning profile specified in your build settings ('Okland Construction 2014') were found.

Get Phone Number(android) in Titanium

自古美人都是妖i 提交于 2019-12-12 05:56:33
问题 How can I get phone number in android? Sample Code: var contacts = Titanium.Contacts.getAllPeople(); Titanium.API.log(contacts[0].phone['mobile'][0]); //in iOS, returns "01012345678" fine :) Titanium.API.log(contacts[0].phone['mobile'][0]); //in Android, returns "" :( Titanium.API.log(contacts[0].fullName); //in Android & iOS, returns "test Name" fine :) Titanium.API.log(contacts[0].phone); //in Android, returns "" :( 回答1: Try the following code, It worked with me //Getting all the contacts

SQLite Titanium Syntax Error

蹲街弑〆低调 提交于 2019-12-12 05:32:16
问题 The following SQL code works fine in SQLite Manager and in other SQLite systems, however when I use it in Titanium I get an "Uncaught SyntaxError: Unexpected String." If my syntax is wrong, how should it be coded for Titanium? SELECT Date, Content FROM MYDATABASE WHERE strftime('%m%d', Date) = strftime('%m%d', date('now')) 回答1: Did you call your table MYDATABASE? Are you stepping through the debugger and confirming that var rs = db.execute("SELECT Date, Content FROM MYDATABASE WHERE strftime(

iOS Simulator failed to install the application in Titanium

佐手、 提交于 2019-12-12 05:27:35
问题 I have created a Titanium ios 3.1.0 app, But now when I am trying to run it is giving me the following error. [ERROR] : An error occurred running the iOS Simulator [ERROR] : [DEBUG] Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=1 "SpringBoard failed to launch application with error: -3" UserInfo=0x7fe2b84837c0 {NSLocalizedDescription=SpringBoard failed to launch application with error: -3, DTiPhoneSimulatorUnderlyingErrorCodeKey=-3} [ERROR] : [ERROR] : Project