webOS 控制器和助手

发布于 2024-09-16 14:54:36 字数 192 浏览 3 评论 0原文

我已经开始修补 webOS,它非常酷。在所有主要的智能手机平台中,我不得不说 webOS 是最容易使用的。目前,我只是想对框架有一个直观的认识,我只是修补基本的东西,如事件处理、推送和弹出场景等。这已经让我走了很远,但我已经到了我的应用程序的地步需要更多的模块化,因为它们在逻辑上不再适合具有多个场景的单个阶段。我想知道如何编写自己的助手和控制器并在我的代码中使用它们?

I've started tinkering with webOS and it's pretty cool. Out of all the major smartphone platforms I have to say that webOS is the easiest to work with. Currently I'm just trying to get an intuitive sense for the framework and I'm just tinkering with basic stuff like event handling, pushing and popping scenes, etc. This has gotten me far but I'm getting to the point where my applications need a little more modularity since they no longer logically fit on a single stage with multiple scenes. I would like to know how do I go about writing my own assistants and controllers and using them in my code?

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

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

发布评论

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

评论(1

2024-09-23 14:54:37

您使用的是安装了插件的 Eclipse 吗?

即使没有,只需复制一个基本控制器并在您看到它的任何地方更改类名称即可。

说 HomeController 到 PreferencesController

将preferencescontroller.js 添加到您的sources.json 文件中,并在视图中添加一个名为preferences 的文件夹,其中包含一个preferences_scene.html 文件(我相信)。

由于当前的框架是 MVC,您可能还需要考虑创建 javascript 模型来容纳您的验证,甚至可以是全局的或特定于视图的帮助程序文件。不过,除非通过您自己的努力,否则这一切都不会真正得到执行。

此外,除此之外,惠普将在 5 天内召开一次会议,展示他们的新设备,甚至可能展示他们名为 Enyo 的新模块化框架,所以这可能是您所希望的。

Are you using Eclipse with the plug in installed?

Even if not, just copy a basic controller and change around the class names everywhere you see it.

Say HomeController to PreferencesController

Add that preferencescontroller.js to your sources.json file and add a folder in the views called preferences with a file in there preferences_scene.html (I believe).

Since the current framework is MVC, you may also want to think about creating javascript models that would house your validation and even helper files that could be global or view specific. None of this is truly enforced except through your own doing though.

Also, beyond that, in 5 days HP will have a conference that shows off their new devices and possibly even their new modular framework titled Enyo, so that may be more what you are hoping for.

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