在 Blackberry Playbook 的移动 Flex Hero 项目中使用 qnx.ui.picker.Picker

发布于 2024-10-21 13:58:04 字数 965 浏览 2 评论 0原文

一个选择器示例用于 ActionScript 项目。它在模拟器中运行良好。

但是如何在 Mobile Flex 项目(使用 Burrito Flash Builder)中使用该组件呢?

如何将 qnx.ui.picker.Picker 添加到 spark.components.View

后者似乎需要一个mx.core.UIComponent,但前者是一个qnx.ui.core.UIComponent

我上面提到的 ActionScript 项目工作正常,因为 Picker 已添加到 Sprite 中。但将其添加到 Mobile Flex 项目中的视图对我来说失败了。

谢谢你! 亚历克斯

更新:

我今天找到了这个页面:http://corlan.org/2011/03/28/creating-playbook-apps-with-flex-and-qnx-ui-components/

还有我发现 QNX AIR 组件也可以在 Android 上运行,想知道在 Android 上使用它们是否合法? Playbook SDK 法律声明中未提及任何内容。

there is a Picker example for usage in an ActionScript project. It works well in simulator.

But how do you use that component in a Mobile Flex Project (with Burrito Flash Builder)?

How do you add a qnx.ui.picker.Picker to a spark.components.View?

The latter seems to expect a mx.core.UIComponent, but the former is a qnx.ui.core.UIComponent.

The ActionScript project I've mentioned above works ok, because the Picker is added to the Sprite. But adding it to a View in a Mobile Flex project fails for me.

Thank you!
Alex

UPDATE:

I've found this page today: http://corlan.org/2011/03/28/creating-playbook-apps-with-flex-and-qnx-ui-components/

And also I've found out that the QNX AIR components work on Android as well, wonder if it is legal to use them there? Nothing is mentioned in Playbook SDK Legal Notice.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

美胚控场 2024-10-28 13:58:04

据我了解,目前我们无法在 Flex Mobile 项目中使用 UI 组件。
您可以转到:项目 - 属性 - Flex 构建打包 - BlackBerry 平板电脑操作系统并选中在构建路径中包含 BlackBerry 平板电脑操作系统库,但是,您会收到错误:

“设计模式无法加载 qnx-air.swc。它可能与此 SDK 不兼容或无效(DesignAssetLoader.CompleteTimeout)”

BlackBerry 人员表示将在未来版本中修复该问题。所以现在您只能在 ActionScript 中使用 QNX 组件。

As I understand, right now we can't use UI components in Flex Mobile project.
You can go to: Project - Properties - Flex Build Packaging - BlackBerry Tablet OS and check Include BlackBerry tablet OS libraries in build path, but, you'll get an error:

"Design mode could not load qnx-air.swc. It may be incompatible with this SDK, or invalid. (DesignAssetLoader.CompleteTimeout)"

BlackBerry guys says that it'll be fixed in future release. So right now you can use QNX components only in ActionScript.

埖埖迣鎅 2024-10-28 13:58:04

首先,您需要将 SDK 中的 swc 添加到您的 Flex 项目中:

右键单击该项目并选择“属性”,
在 Flex Build Path 下,添加 SWC 并浏览至 SDK。
...\Adobe Flash Builder Burrito\sdks\blackberry-tablet-sdk-0.9.3\frameworks\libs\qnx-screen\qnx-screen.swc

在项目中拥有 swc 后,您可以在脚本中以编程方式创建实例标签,例如:

import qnx.ui.picker.Picker;
var pick:Picker = new Picker();
var arr:Array = [{label: "day", data:0}, {label: "week", data:1}, {label: "month", data:2}];
pick.dataProvider = new DataProvider([new DataProvider(arr)]);
pick.selectedIndices = [0];
addChild(pick);

您可能需要首先向视图添加一个容器,例如添加一个 mx:UIComponent 元素,然后向其中添加选择器,例如

<mx:UIComponent id="pickerContainer"/>

pickerContainer.addChild(pick);

First you need to add the swc from the SDK into your Flex Project:

Right click the Project and select Properties,
under Flex Build Path, add a SWC and browse to the SDK.
...\Adobe Flash Builder Burrito\sdks\blackberry-tablet-sdk-0.9.3\frameworks\libs\qnx-screen\qnx-screen.swc

Once you have the swc in the project you can create instances programmatically in the script tag, eg:

import qnx.ui.picker.Picker;
var pick:Picker = new Picker();
var arr:Array = [{label: "day", data:0}, {label: "week", data:1}, {label: "month", data:2}];
pick.dataProvider = new DataProvider([new DataProvider(arr)]);
pick.selectedIndices = [0];
addChild(pick);

You may need to add a container to your view first, eg add a mx:UIComponent element and then add the picker to that, eg

<mx:UIComponent id="pickerContainer"/>

pickerContainer.addChild(pick);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文