titanium-mobile

Titanium delete TableViewRow, model-view binding should automatically reflect tableview

主宰稳场 提交于 2020-01-15 12:33:11
问题 This is how I delete a tableviewrow on a longclick event of a tableview (android) $.tableview.deleteRow(e.index); , but this just removes the row. How do I also remove the data on my tableviewrow which will in turn remove it from collection via model id, and model-view binding should automatically reflect this in tableview.Any Ideas?Thank You. 回答1: you need to delete the model object from the collection which will then trigger the appropriate events to update the table. So in your longpress

Build ti.barcode failed

邮差的信 提交于 2020-01-07 06:36:09
问题 This is my first time to build Titanium module. What I am building is the ti.barcode for Android. I grasp the source code from Github and import to Titanium studio. Some build path error is easily corrected by opening build path and just close. There is no error shown on the project. But when I tried to package it, I always get error message: Launching build and packaging failed Build failed. Unable to locate generated zip file at /Users/ymlan/Code/ti.barcode-android-2.3.5/dist/ti.barcode

Ti.App.fireEvent - Reference error Ti is not defined

╄→гoц情女王★ 提交于 2020-01-06 19:17:22
问题 I have this simple Titanium js script. app.js var win = Ti.UI.createWindow(); var webview = Ti.UI.createWebView({ url: 'logging.html' }); webview.addEventListener('help',function(){ alert('help'); }); win.add(webview); win.open(); logging.html <html> <body> <a onclick="Ti.App.fireEvent('help')">Help</a> </body> </html> when I click on the Help link, the console gives me Reference Error: Ti is not defined . I also tried changing Ti with Titanium, but same error. ------------- EDIT ----------

Failed to open remote server file in Titanium

霸气de小男生 提交于 2020-01-06 17:58:25
问题 I want to get remote data from server but this is giving error that connection not execution. And in Console of Chrome browser shows. Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8020' is therefore not allowed access. XMLHttpRequest cannot load http://domeain.com/json.txt. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8020' is therefore not allowed access

Failed to open remote server file in Titanium

不想你离开。 提交于 2020-01-06 17:58:10
问题 I want to get remote data from server but this is giving error that connection not execution. And in Console of Chrome browser shows. Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8020' is therefore not allowed access. XMLHttpRequest cannot load http://domeain.com/json.txt. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8020' is therefore not allowed access

Titanium.App.Properties is it safe

五迷三道 提交于 2020-01-06 16:08:46
问题 I'm using Titanium.App.Properties to store user highly confidential data. So is it safe to store values here. Is it possible jailbreak iPhone's to leak this values. Is this values encrypted or stored as plain text? Thanks in Advance. 回答1: Here is an update to this old question: From Titanium 3.X docs: As of Release 3.2.0, any application properties defined in the tiapp.xml file are stored in the device's secure storage, making them read-only. Additionally, external access to these properties

Titanium mobile image processing

蓝咒 提交于 2020-01-06 12:51:08
问题 I have an image view, and after getting the image and setting the image view I am having a simple problem. Depending on if it is landscape or portrait, and if the image view is a square, the image view will not be filled. The only way I can achieve this using a landscape photo is to essentially crop it, otherwise it is stretched. The trouble is - by cropping the photo into a square that I can then resize - I end up losing the areas that I have cropped, making way for an incomplete photo.

titanium android: close application completely (no caching)

江枫思渺然 提交于 2020-01-05 07:04:19
问题 When user presses the back button, titanium application gets closed. But the application can be viewed in cached processes list (under settings-->applications-->running services-->menu pressed-->show cached processes). I want my application to get killed completely when it gets closed. (Just FYI, I am using titanium android module.) Any help? 回答1: There is a boolean property on the window for Android only. Before opening the window, set win.exitOnClose = true; 回答2: Don't do that. Chez Android

Yahoo Authorization OAUTH:oauth_problem=“timestamp_refused”

那年仲夏 提交于 2020-01-03 16:55:09
问题 I have been following Yahoo OAUTH guide closely and successfully established a connection and was able to retrieve the access token along with other objects which i get in response URI.But, now when i try to fetch the Contacts of the authenticated user i always get this Error no matter what NTP server i choose for my computers clock: Authentication error: Unable to respond to any of these challenges: {oauth=WWW-Authenticate: OAuth oauth_problem="timestamp_refused", realm="yahooapis.com"}

How to retrive values from Database in Titanium Alloy?

给你一囗甜甜゛ 提交于 2020-01-03 00:50:08
问题 I'm new to Titanium API. I want to know how to retrieve values from DB and display in UI. I created a model and inserted a row. My code is as below, Model: var moment = require('alloy/moment'); exports.definition = { config : { "columns": { "id":"text", "LanguageName":"text" }, "adapter": { "type": "sql", "collection_name": "UserLanguage" } }, extendModel: function(Model) { _.extend(Model.prototype, { }); return Model; }, extendCollection: function(Collection) { _.extend(Collection.prototype,