< Programming for Palm OS

Download the SuperWaba SDK

You can download it from here: http://www.superwaba.com.br/en/downloads.asp *404 error

If it requires you to log in, either create an account (free) or use an account from BugMeNot.com.

Unpacking the SDK

If you're running Linux, you can rename the .exe to .rar and use unrar to unpack the SDK.

unrar x GPL_SuperWabaSDK.rar

Setting Up Eclipse

Create a new Java Project in Eclipse "from existing source", with the directory: $SUPERWABA/src/java/

Add an External Archive to the Build Path: $SUPERWABA/lib/SuperWaba.jar.

After some fiddling, my .classpath ended up like this:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry excluding="waba/|superwaba/bin/" kind="src" path=""/>
	<classpathentry kind="lib" path="/home/user/SuperWaba/lib/SuperWaba.jar"/>
	<classpathentry kind="lib" path="/home/user/SuperWaba/lib/vm/applet/Waba_only.jar"/>
	<classpathentry kind="output" path="superwaba/bin/"/>
</classpath>

Running the Samples

Run:Run... Java Application

  • Main class: waba.applet.Applet
  • Arguments: superwaba.samples.ui.gadgets.UIGadgets

Our First Program

package superwaba.samples.helloworld;

import waba.ui.Label;
import waba.ui.MainWindow;

public class HelloWorld extends MainWindow {
	public HelloWorld() {
		super("HelloWorld!", TAB_ONLY_BORDER);
	}
	
	@Override
	public void onStart() {
		add(new Label("My Hello World Program"), CENTER, CENTER);
	}
}

Run this program the same way you would one of the sample applications.

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.