问题标签 [titanium-mobile]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
192 浏览

javascript - Unable to update values in arrays

I am using Titanium Appcelerator.

I have an array of buttons that I've created for a game. There is one array of buttons per player. I also have an array of player objects, and each one has a "score" property.

When a player presses one of the buttons, which all have an assigned value, the player to whom this button belongs is to have his score updated.

Here is how I am creating a set of buttons for each player:

I am setting a property of "myPlayer" to the player that the button belongs to. This is so that I can associate it to the player when pressing it, and so that I know which score to update. This for loop is in a function that gets called when the game begins, and is passed the "thePlayer" variable which holds the player object to which it belongs to. However, there seems to be a disconnect here. Example: If player 1's score is, let's say, 0, and a button is pressed that's worth 50, I do either of these things, which have no effect on the object property for the player's score:

("this" is the button pressed)

No idea why I can't change a player's score. I hope this is clear enough.

0 投票
1 回答
1013 浏览

android - Titanium Android:borderColor表现得像backgroundColor

我正在 Titanium 中开发我的 android 应用程序。对于某些视图(例如 Ti.UI.View),我试图通过指定borderColor 和borderWidth 等属性来设置边框。但我看到的是整个视图的背景颜色与边框颜色相同。这是Titanium中的错误吗?或者我做错了什么。以下是我的代码片段。

为此,我得到的是一个 200x200 像素的红色框。请让我知道是否有办法纠正这个问题。

0 投票
1 回答
668 浏览

iphone - iPhone 模拟器显示

我正在使用 Titanium 构建我的第一个移动应用程序。最终,我需要通用,但我最初专注于 iPhone 以便了解我的方式。我遇到了图像显示问题,因为我需要同时测试视网膜和非视网膜显示器,但我似乎无法在两者之间切换。

默认情况下,无论出于何种原因,我的模拟器都会以“旧”iPhone 分辨率(特别是 iOS 5 的组合——因此位置位主要工作——和旧 iPhone 硬件)启动。我在模拟器的硬件菜单中看到我应该能够切换到 iPhone(视网膜),但尝试这样做只会一起中止模拟器。

有没有更好的方法在模拟器中的硬件/软件组合之间导航?可以更改默认配置吗?这个 n00b to mobile dev 将非常感谢任何提示或技术。不管它值多少钱,模拟器版本是5.0 (272),虽然我没有开发本机代码,但我的 XCode 版本是4.2.1

谢谢。

0 投票
1 回答
440 浏览

flash - Titanium 移动和 Flash 媒体服务器 (FMS)

我需要将我的 Titanium 应用程序连接到流式视频服务器 (fms)。Titanium Mobile 可以做到这一点吗?

0 投票
2 回答
9602 浏览

titanium-mobile - 钛金属显示活动指示器

我在 android 中使用进度条,但在钛中,它的活动指示器用于显示在 android 中后台发生的一些进度我的后台任务未完成 daisply 指示器并在完成后自动隐藏...我的活动指示器代码和我想在后台显示的任务如下..

0 投票
0 回答
538 浏览

javascript - 钛金属手机,用memorypool释放内存

我正在尝试使用另一天发现的 memorypool 函数找到一种解决方案来释放 android 上的内存。我的问题是我不确定如何实现它。如何调用该函数以及如何在其中传递 window.children 对象。这是我找到的原始功能:

假设我有一个简单的窗口和几个孩子。Shell 我只是在开始时调用 MemoryPool 或者我需要将一些东西传递给它,比如 MemoryPool(obj)

如果有人对此有更好的想法,谢谢。

0 投票
1 回答
1158 浏览

titanium - 刷新后不要附加相同的数据

我第一次为 Iphone 应用程序使用 appcelerator,我使用 TableViewRow,当窗口加载一切正常时,但如果我想刷新窗口,TableViewRow 每次我推送刷新时都会重复相同的数据,所以,我有5 个类别,刷新后我每次尝试刷新时都会重复相同的类别。

0 投票
4 回答
3873 浏览

iphone - 在 Titanium SDK 中重新创建此动画

我以前在 Xcode 中开发我的应用程序,但决定转移到 Titanium 以允许 Android 开发。

我还在习惯 Titanium,所以在尝试重写我的应用程序时遇到了一些问题。例如:我将如何在 Titanium 中重新创建这个动画?

基本上我的 UIView 包含一个 MKMapVIew、一个 UITableview 和一个在它们之间切换的按钮。任何帮助是极大的赞赏!

http://www.screenr.com/2kts

0 投票
1 回答
3568 浏览

sql - 从 Titanium Appcelerator db 列获取值

我四处张望,但我似乎无法确切地找到我想要做的事情。它应该相当简单......

我有一个像这样设置的数据库表:

我有两个按钮,其分配值分别为 25 和 50。每个按钮都有一个“值”键,我在其中分配它们的值。我正在尝试完成三件事:按下按钮时,找到相应值的列。将此列的值增加 1。检索新值并在控制台记录它。

这是按下按钮时我的代码的样子:

这一切都在单击事件侦听器中,其中变量“所有者”作为字符串传入。

这是我得到的错误:

我对sql没有太多经验,所以我不确定我做对了什么,我做错了什么。任何帮助表示赞赏!

谢谢。

0 投票
2 回答
2134 浏览

sqlite - 如何在 Titanium 中将数据库导入 Navicat Lite 或 sqlitemanager

在我的钛应用程序中,我可以创建数据库并访问它。但我不知道如何将我的数据库导入到查询浏览器中,如 Navicat Lite 或 Firefox 上的 sqlitemanager 扩展。

我正在开发 Android 平台。我的 Titanium SDK 版本是 1.7.5 操作系统:ubuntu 如何将我的数据库导入 Navicat Lite?