April 14, 2003

Creating your first OPL application on the 92x0.

Well by now you have the runtime installed, and no doubt have decided it's time to create that tetris/arkanoid/pong clone that you have been thinking about since you picked up the 9210. Fear not, here we are to save you tons of effort and bring a whistle stop tour to getting started.

First off, if you haven't got it already you need the OPL developer environment, this is a free download from Symbian's website, and can be found if you follow the link to the 9210 runtime and there will be a link to the developer application.

From now we'll assume you've been able to install the developer application ok, if you haven't installed it yet, you need to install the OPLdev.sis file, in a similar manner to the instructions on installing the 92x0 runtime.

Now that everything is ready to go, if you select extras and scroll around you should find an icon of a styleised 92x0 with the word "program" next to it. Open that application and you are presented with a dauntingly blank screen, here is where it's handy to have another computer nearby at the start. Now with the OPL developer application should be a zip file called ER5docs and some documents on porting to Crystal 6.0 OPL. On the whole OPL is predominantly the same as on Epoc Release 5 (as used on the Psion series 5 PDAs), so the changes won't effect you too much, the first step is to extract that zip file to somewhere relevant on your PC.

Here we have a choice if you are using windows and you like the help interface then run the OPL.chm file in the SysDoc folder, if you aren't running windows, don't like the help interface, or doing everything on the 92x0 then you will need to use the html files, where ../SysDoc/opl/group/opl.html is the root file of the documentation. Once you have the documentation open, follow the link to "Introducing OPL" and then to "A First Program". This document talks you through writing a simple hello world style app and explains the basic semantics of the OPL language.

Useful areas to note are the "Keyword Reference" as this has a full list of commands and their parameters, and the "Appendices" which has information on the various error codes, a listing of all the constants used in OPL as standard, and the various symbols and modifiers that the language accepts. The "Programming in OPL" category takes you step by step through learning the language by explaining what you need to know and supplementing that in places with snippets of code to show the use of the information given. The "Example Programs" are simple apps that explain various functions of the language though not all.

Once read and partly digested the help docs should leave you in good stead for starting your own applications, but for those who like a simple starting base, Ewan Spence, of FreEpoc has release an OPL app called "Core.opl" which is an OPL file containing the basics of setting up the UI (User Interface) of the 92x0 which will make life easier when making UI apps. This file can be collected at http://www.freepoc.org and OPL tutorials penned by Ewan Spence can be found at http://www.allaboutsymbian.com under the "Develop" tab.

Have fun coding in OPL and let us know when you release something into the wild.

Posted by Switchblade at April 14, 2003 01:02 PM
Comments
dsfsgfd geg dggdg dgg gfd gfd dh sh hs Posted by: rajan khare on February 2, 2024 07:54 AM
awdska;ldk dkslf lkd slksfdl;gk dfl;gkklgk;lkg asjgjgkl jkghkh gjkgasdhkja Posted by: rajan khare on February 2, 2024 07:55 AM
Hi All!I love your site! Mark painting Posted by: painting on April 25, 2024 06:18 PM
Hi All!I love your site! Mark painting Posted by: painting on April 25, 2024 06:32 PM
Post a comment