titbits from the world less travelled

Archive for the 'palm pre' Category

WebOS – Palm Pre tutorials – Adding a textfield and sample project

Wow…finally got to run my very own tutorial on eclipse. Actually developing on a webos SDK is an easy task. If not for the understanding of the architecture, everything else is child’s play I suppose.

If you have a understanding of HTML, CSS and Javascript you must be able to get through. Ok, right to the basics. In a Palm Pre SDK(webos) we have a stage, this stage is the one which is the foundation.  On this stage, you can run your scenes. In most cases index.html would be your default stage. So please dont try to run or add anything on the stage.

For example, I tried adding a text field to be displayed on this for nearly two hours, but then finally figured out that it was not possible. Basically, you code your application as a storyline. You go from one scene to the other.

To make it easy first install java, then virtual box from sun and then palm emulator. In eclipse first, add a mojo project.  Then you can check out the folder structure as below:

Take a look at the contents of the new HelloWorld folder:

  • app folder — contains the assistants, models, and views that make up the application. Later in the tutorial, you add files to this directory.
  • appinfo.json — the Application Information file.
  • icon.png — the image that the application presents in the Launcher on the emulator or device.
  • images folder — any other images the application uses.
  • index.html — the main stage on which the application’s scenes appear.
  • sources.json — a list of the source files for each scene.
  • stylesheets folder — contains the cascading style sheet file for the application.

I wont give you a run through of the structure since you can find it on the palm website. Now since index.html is basically a stage, and you have to add the scenes on top of this. Remember ( as far as I can see) you cant add anything to the stage.

So we go ahead and create a scene in eclipse.

[
{"source": "app\/assistants\/stage-assistant.js"},
{
"source": "app\/assistants\/myscene-assistant.js",
"scenes": "myscene"
}
]

The source.json will be as shown above. So we have the first scene. Next we goto the .html page of the scene where we need to add the display stuff. I just add a textfield as below-

//—————————-
MY ID: <div id=”myId” x-mojo-element=”TextField”></div>

//—————————–

Next we add the code to myscene-assistant.js to display this scene on the stage:

mysceneAssistant.prototype.setup = function() {
/* this function is for setup tasks that have to happen when the scene is first created */

/* use Mojo.View.render to render view templates and add them to the scene, if needed. */

/* setup widgets here */

/* add event handlers to listen to events from widgets */
var attributes = {
textFieldName: ‘username’,
hintText: ‘Enter Your Username’,
modelProperty: ‘value’
};

this.model = {
};

this.controller.setupWidget(‘myId’, attributes, this.model);
}

//—————————————-

Ok..finally go to the stage assistant and add this line to push the scene on the stage…

StageAssistant.prototype.setup = function() {
this.controller.pushScene(‘enter-reminder’);
}

WOWOWOWO—now you have your very own textfield displaying on the stage. Congrats..

posted by admin in Uncategorized, palm pre, webos and have No Comments

Hello ALL: Palm OS SDK (Mojo) has been released

Hello All!!! Got this exciting news: Palm SDK has been released. Cant wait to get my hands on it…

As an applicant for the Palm webOS Mojo SDK early access program, we wanted you to be among the first to know that the Mojo SDK is now publicly available. This is a very exciting and important stage for Palm webOS development, and we want you to be part of it. We’re opening the doors to the SDK by launching a new developer portal at http://developer.palm.com called webOSdev, where you can download the SDK and accompanying documentation, and join the public webOS community forums.

I want to thank you for your patience while we allowed a few developers to kick the tires on our APIs, tools and docs before we released them to the rest of the world. We’re working hard to ensure that Palm webOS becomes a world-class platform for application development, but we need to do so in a measured and focused way so we can be sure we’re providing a great development experience and attentive developer support.

We know that a thriving app marketplace and a vibrant developer ecosystem are critical to the success of Palm webOS, and that relies largely on you. We think we have something amazing here, and we’re inviting you to join the Palm webOS community and help us fulfill the potential of this compelling new platform.

Welcome!

Michael Abbott
Senior Vice President, Application Software and Services
Palm, Inc.

posted by admin in palm pre and have No Comments

Turn your iPhone / Palm Pre into a modem

I thought I would post it on my blog, since I found it pretty interesting and it might help us a lot actually.

Imagine, you travel by train everyday, you would need a net connection to browse the internet. For this you would need to go out and buy a wireless connectivity card. Which I think would set you back by another 60 – 70$ in additon to the wireless carriers fee.

Instead go this website http://www.iphone-notes.de/?p=5969

Use google translate to convert the page into english from german. They tell you how you can use the mobile as a modem. Pretty neat stuff.. check it out..

posted by admin in iphone, palm pre and have No Comments

Palm Pre and Web OS

I am still not sure why PALM is not releasing their web os to third party developers. They also must know by now that if they have to stand a chance in front of apple, they need to have those APPS. I had applied for the OS on their website about two weeks back, and have not received a acknowledgment as yet.

iPhone has thousands of apps just about to do anything in this world. I cant think of an app which is not there. The one good thing about Palm pre web OS, is it will have a short learning curve, since its OS is mainly web based like java script and so on.

In my view they must release the web development kit at the earliest to undo any further damage.

posted by admin in palm pre and have No Comments