titanium

Titanium + Rails + Paperclip === NULL values?

独自空忆成欢 提交于 2019-12-08 05:48:56
问题 EDIT: The real question was whether or not you can use a JSON http header, and how to format an XHR send of a file to a Rails application. 回答1: In order to get the file there successfully, you might need to assemble a request with a content-type of "multipart/form-data". Here's a page I found that seems to have the right kind of information to send you in the right direction: http://www.smokycogs.com/blog/titanium-tutorial-how-to-upload-a-file-to-a-server/ 来源: https://stackoverflow.com

Get list of circles of a user using Google Plus API

99封情书 提交于 2019-12-08 05:06:11
问题 I am using google aouth with following in scope scope : ['https://www.googleapis.com/auth/tasks', 'https://www.googleapis.com/auth/tasks.readonly', 'https://www.googleapis.com/auth/userinfo.profile', 'https://www.googleapis.com/auth/plus.me', 'https://www.googleapis.com/auth/plus.circles.read'] I tried to get information about user, I've used following API var xhr = Ti.Network.createHTTPClient({ onload : function() { var data = this.responseText; var json = JSON.parse(data); Ti.API.log('json:

execute commands of another program from a tidesdk program

可紊 提交于 2019-12-08 03:16:56
问题 I'm testing tidesdk. I have a java program that reads from standard input. I run the program through the console console java -cp MyProgram.jar package.MyMainClass And then execute commands and get results. there any way to do with tidesdk? Edit: The problem was that calls the java program with a list of one element (which contained the command separated by spaces) It solved with passing every word to a item of list (and removing the spaces). Right now I have porblemas to write standard input

Get contact details to titanium from native iOS contact app

浪子不回头ぞ 提交于 2019-12-08 02:45:42
I'm new to Titanium. Currently I'm working on a project in this the user needs to use the contact details from iOS contacts App. My app.js looks like this Window = require('ui/handheld/ApplicationWindow'); var win = Window(); win.open(); var button = Ti.UI.createButton({ title : 'Show Contacts', width : 100, height: 50, }); win.add(button); button.addEventListener('click',function(e){ Titanium.Contacts.showContacts({ }); }); When I click on a button the following code is displayed: And when I select an contact the detail is displayed on the other screen: But I don't want this, When the user

How do I run the Xcode project generated by Titanium?

杀马特。学长 韩版系。学妹 提交于 2019-12-08 01:04:20
问题 I'm sure it used to be possible to do this but I don't seem to be able to run the Xcode project generated by Titanium in Xcode. The app installs in the simulator and starts but immediately stops with the following runtime error: Could not find the file app.js I'm running Xcode 7.2.1 with appc cli 5.1.0 / ti CLI 5.0.5. The app is built with 5.1.2.GA. Running the app in Xcode would provided access to instruments and perhaps better insight in native level crashes etc. 回答1: What you are trying to

Titanium Desktop createProcess to run shell script

三世轮回 提交于 2019-12-07 23:33:29
问题 I'm new to Titanium and am trying to create a small test. I am on a Mac and trying to run the following code: <a id="btn-file" href="#">Create File</a> <script type="text/javascript"> document.getElementById("btn-file").addEventListener("click", function() { var process = Titanium.Process.createProcess( ['touch', 'file.txt'] ); }); </script> However, file.txt is not created. How do I run a terminal command from Titanium Desktop? Eventually, I'd like to click btn-file and it runs a shell

$_SERVER['PHP_AUTH_USER'] empty

落爺英雄遲暮 提交于 2019-12-07 20:28:46
问题 EDIT: Problem isn't with PHP, I was using cURL wrong. Updated question to show problem I'm having with XHR. Summary: Can't get username to PHP using XHR: var xhr = Ti.Network.createHTTPClient(); xhr.timeout = 1000000; xhr.open("GET","http://myapi.com/test", false, 'user', 'pass'); xhr.send(); And in my PHP script, I'm trying to access the username with this: <?php print $_SERVER['PHP_AUTH_USER']; ?> No matter what I try it's always empty. Is there some PHP setting that I need to configure?

iPhone SDK “loading” on Titanium Developer

左心房为你撑大大i 提交于 2019-12-07 19:26:42
问题 I have tried this question on the site of Titanium and several tweets to their account, but they either ignore me or refuse to answer. I want to start using their framework, but for some reason the iPhone SDK is always "loading" when in the "TEST & PACKAGE" tab. Have you guys found a fix for this? I have: Snow Leopard 10.6.3 Titanium Developer 1.2.1 iPhone SDK 3.2 All the certificates "blah blah" from Apple because I am able to test and deploy apps on my device using XCode. Help please :) 回答1

How to calculate the sunrise and sunset in javascript?

↘锁芯ラ 提交于 2019-12-07 12:31:21
问题 i am using appcelerator titanium to develop an IOS app and i want to let my app send local notification to the users in sunrise and sunset a good tool to solve this is Yahoo weather using YQL ; however, yahoo weather is for non-commercial use only!! i am trying to find a javascript library to calculate the sunrise/set + a database of the world's countries and cities with the latitude and longtude have anyone ever needed the same? Any idea. 回答1: This algorithm looks pretty wicked to solve

Add overlay over top of ZBar scanner

久未见 提交于 2019-12-07 08:19:05
问题 I'm using the ZBar SDK to read QR codes on iPhone, however I want to add some text to the bottom of the camera/scanner view that is instructional text for the user. Here is what I have so far: UIView *cameraOverlayView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; cameraOverlayView.backgroundColor = [UIColor redColor]; UILabel *instructionLabel = [[UILabel alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; [instructionLabel setTextColor:[UIColor