September 09, 2005

Mobile blogging revisited

After an unsuccessful attempt with mobile blogging more than a year ago, I decided to give it a second try with my new Communicator.
And, although it took me some time to set it up (largely due to the fact that I mistyped the address for the MT server at least 5 times), it works now.

This means that I can now add and edit entries while on the move.
The program I use is Azure, which works great once you get the hang of it. The only disadvantage is that the text entry window is very very small (most probably due to the fact that this is a midlet which should also work on a J2ME phone without at 640x200 screen).
Apart from that it supports everything I need, including setting categories for posts, typing body and extended body entries separately, modify existing entries etc.

Michael Gratton, Thanks!

Posted by Arjen at 06:34 PM | Comments (0) | TrackBack

September 08, 2005

Too many things to do, but trying anyway....

It's been a while since I wrote an entry in this blog. I always tell myself that from now on I'll write at least something in here weekly, but I simply don't get around to writing anything, because there's always something that needs to be done. Most of the time I also don't know what to write (don't want to bore everyone with the things I did today).

So, I've decided to start writing OPL programming tutorials here, since I love this language and I would really like to see more people using it. The first tutorial is easy: how to get things up and running to start programming OPL on your Communicator.

If you want to program OPL, there are two ways of doing it:
- On a PC
- On the device itself.
This tutorial discusses the second, most convenient, method, since you can immediately see and test the results if you program directly on the device. But, the biggest problem starting OPL programmers face is getting all the stuff necessary for programming, since the resources seem to be scattered all over the internet. As you will see from this tutorial it's not all that bad. I'll explain, in a few easy steps, where to get the necessary files and what files to install where in order to get started on programming. All the steps described in this tutorial are valid for programming on a Nokia 9210(i) as well as for the new range of Communicators (9300/9500).

Get the OPL developers pack
To start programming you need the OPL developers package, which can be downloaded from the OPL pages at sourceforge net (direct link to download). The size of this file is about 1.36MB. Although the filename is 9200-OPL-DevPack, it can be used on a 9300/9500 as well. For the moment, this is the only file you need to start development on your Communicator.

Extracting the needed files
After downloading this file, unzip it to a temporary folder on your PC's harddisk (make sure you select "Use folder names" in WinZip so the files are extracted to the correct folders).

A lot of the files in the developer package are needed for OPL development on a PC. But, for this kind of development, you also need to have the 9210 or S80 SDK installed (which is a 200 to 300Mb download). Since this tutorial only focusses on programming on the device itself, we can delete all the PC related stuff:
The OPL developers package contains two folders: \Binaries\ and \Examplesrc\. In the \Binaries\ folder you'll find the folder SisFiles\. The \Binaries\, SisFiles\ and \Examplesrc folders also contain a folder called Pc\. Since we don't need any of the files in these Pc\ folders it's ok to completely delete all of them.

Installing the OPL runtime
If you do not have the OPL runtime installed yet, you need to install it first.
There's a small snag here. The OPL developers package only contains the OPL runtime for the Nokia 9210. If you want to develop OPL on a Nokia 9300/9500 you need to install the runtime for the 9300/9500 which you need to download first (direct link to download).

To install the OPL runtime on a Nokia 9210, install the file \Binaries\Target\Other\OPL.sis to your Communicator.
To install the OPL runtime on a Nokia 9300/9500, download the runtime from the above link, extract it to a temporary folder and install the file 9500-opl-public-2024-11-28.sis to your Communicator.

It is recommended to install the OPL runtime on your MMC card.

If you want to verify if the OPL installation works correctly, you can install \Binaries\Target\Other\DemoOPL.sis. After installation of this file you should see a new program in Extras (9210) or Desk (9300/9500). If you can start and run this program, the OPL runtime is installed correctly.

Installing the OPL program editor
All development on the Communicator is done with the OPL editor. The name of this application is "Program" and can be installed (both for 9210 and 9300/9500) from the folder \Binaries\SIS Files\Target\Other\OPLDev.sis.

Installing OPX's and header files
With the installation of the OPL program editor, three OPX's (OPL extension libraries written in C++) were installed as well in the \System\OPX\ folder (AppFrame.opx, SendAs.opx and System.opx). To be able to use these OPX libraries in your OPL program, you need a header file which describes the exported functions in this OPX. The extension of these header files is .OXH. Header files are always installed in \System\OPL\ (you can already find AppInfo.oxh, SendAs.oxh and System.oxh in this folder).

The OPL developer package contains a lot more OPX's that you can use for OPL programming. It's easiest to install them all. They take up very little disk space and once you need them it's very convenient to have them installed already.

To install the OPX's, install all SIS files from the \Binaries\SIS Files\Target\OPX\ to your Communicator (preferrably on the same drive you installed the OPL runtime on). Of course you don't need to reinstall AppFrame.opx, SendAs.opx and System.opx.

After this copy all the header files for these OPX's in the \System\OPL\ folder on the same drive you installed the OPX files. The header files for all OPX's can be found in \ExampleSrc\Target\System\OPL\.

After this, you're ready to the "Program" application and start developing your OPL applications on your Communicator.

Next steps
The next tutorial will explain how to write a basic OPL application (we will write a small but useful application from scratch). It will cover the following topics:
- basic application framework (using AppFrame.opx)
- handling events
- creating application bitmaps
- packaging and distributing your application

Posted by Arjen at 02:02 PM | Comments (4)