Frequently Asked Questions
"You can tell whether a man is clever by his answers.
You can tell whether a man is wise by his questions."
|
-
Naguib Mahfouz
|
General Questions
- Is Waba an implementation of Java?
- Is Waba free?
- How stable is the Waba Virtual Machine?
- Who came up with the idea for Waba?
- Is there a Waba newsgroup somewhere?
Developer Questions
- Are there Solaris or Linux versions of the SDK programs?
- What JDK should I use to develop Waba programs?
- Can I access native functions?
- Where are the waba.lang classes in the SDK?
- My Waba program says it's out of memory. Now what?
Windows CE Specific Questions
- Can I access Windows CE databases from Waba?
PalmPilot Specific Questions
- Can I access PalmPilot databases from Waba?
- Do Waba programs use the storage heap for memory?
- If I use sockets and try to open one when my program starts, it fails under the PalmPilot. What's going on?
- Does Waba support grayscale drawing on the PalmPilot?
- I can't switch applications when I run a Waba application or the application doesn't seem to close normally.
What's going on?
- Is there a bug drawing clipped lines under PalmOS?
- Is there a bug drawing using the DRAW_AND operation under PalmOS?
- Is there a bug in DRAW_XOR mode copyRect() under PalmOS?
- When I run Gremlins against a Waba program in the emulator, it gives me a Form error. Is this a bug?
General Answers
- Is Waba an implementation of Java?
No. Java is a trademark of Sun Microsystems and it defines a programming
platform including a language, virtual machine, class file format and
set of classes.
Waba is its own programming platform including a language, virtual
machine, class file format and set of base classes.
Because of the way Waba was designed, developers can use Java development
tools to write Waba programs and Waba programs can run as Java applets
or applications with no native code.
Waba applications can run under Java but, for the most part, Java
programs that use the Java Class Libraries can't run under Waba.
Waba programs can run on PalmPilot or Windows CE devices without
any changes to the code if the device contains a Waba Virtual Machine.
Waba Virtual Machines are available, for free, from Wabasoft for
PalmPilot and Windows CE devices.
Refer to the product overview page
for more information.
- Is Waba free?
Yes. The software to build and run Waba programs is available free
on Wabasoft's web site. The software is licensed under the GNU license,
just like Linux. If you need a different license than the GNU license, please contact Wabasoft to discuss license terms.
- How stable is the Waba Virtual Machine?
The WabaVM has been tested extensively for robustness. In its first
release, making it robust was the top priority. If you experience
any problems, please email support with the full description of the
problem.
- Who came up with the idea for Waba?
I believe the original concept is best explained by the
Happy Fingers page.
- Is there a Waba newsgroup somewhere?
Yes, there is newsgroup. A link to it can be found on
our support page.
If you can't access the newsgroup using that link (this is usually
because a firewall at your site is preventing access), you can
access it on the web using Deja. To use Deja:
- Go to www.deja.com/usenet
- Type "~g pilot.programmer.waba" in the search box
Developer Answers
- Are there Solaris or Linux versions of the SDK programs?
Yes, Dr. Fritz Zaucker ported them to both Linux and Solaris.
- What JDK should I use to develop Waba programs?
Any one of them should work fine. We've tested development of Waba
programs using Sun's JDK 1.02, JDK 1.1 and JDK 1.2 and Microsoft's
SDK for Java. There is code in the Waba bridge classes to ensure
you can develop under any of the various versions.
- Can I access native functions?
You can add native functions directly into the WabaVM using the
WabaVM source code.
- Where are the waba.lang classes in the SDK?
The waba.lang package is not part of the SDK, however the waba.lang
classes can be used in a Waba program.
How does this work? When you are developing your program under Java,
simply use the java.lang String, StringBuffer and
Object classes.
The java.lang classes don't exist when you run under a WabaVM because
the WabaVM contains no Java classes.
However it does contain waba.lang String, StringBuffer and
Object classes and when it encounters references to the java.lang
classes, it maps them to their counterparts in the waba.lang package.
So, when you develop your program in Java, simply use the java.lang
String, StringBuffer and Object classes and when you run the program
under a WabaVM, it will use the corresponding classes in the waba.lang
package.
When you are developing a Waba program, you should not import the
waba.lang package or reference it in any other way because it does
not exist in the WabaSDK. If you do, you will get a "package not
found" error when you compile.
Also, make sure you only use the methods documented in the Waba API
reference for the String, StringBuffer and Object methods. There
are many methods part of the java.lang classes that do not have
waba.lang counterparts.
- My Waba program says it's out of memory.
Now what?
You can allocate it more memory. The exegen program determines
how much memory should be allocated to a program. The default is
around 24K of total memory.
The exegen program generates an executable that "starts up" your Waba
program. This program tells the VM how much memory to allocate to the
program.
See the "Dealing with Memory"
page on this web site for a more complete explaination.
Windows-CE Specific Answers
- Can I access Windows CE databases from Waba?
Yes, you can read and write to a Windows CE database using the
Catalog class. The Catalog class is limited, however, to writing
single record blob types to and from a Windows CE database.
PalmPilot Specific Answers
- Can I access PalmPilot databases from Waba?
Yes. You can use the Catalog class to access PalmPilot databases
from a Waba program.
- Do Waba programs use the storage heap for memory?
Yes, starting with the Beta 7, the class heap of Waba programs is kept
in storage memory. The object heap, native stack and VM stack of a
Waba program are kept in dynamic memory.
- If I use sockets and try to open one when my program starts, it fails under the PalmPilot. What's going on?
PalmOS doesn't allow you to open a socket until the "main loop" of your
application has started. If you open a socket before events start getting
processed, PalmOS may reset the device. The WabaVM prevents a Waba
program from opening a socket at the wrong time and won't let a program
open a socket until it is safe to do so.
Waba programs are constructed before the PalmOS event loop starts. That is,
a MainWindow constructor will be called before the "main loop" starts.
So, opening a socket in a MainWindow constructor will fail under PalmOS.
Under PalmOS, you can open a socket once event processing starts.
For example, after a pen event occurs, after a key event occurs
or when the screen is painted. You should only see this problem
if you open a socket in your program's constructor.
- Does Waba support grayscale drawing
on the PalmPilot?
You may have seen or used PalmPilot programs that draw in 4 color
grayscale (2 bits per pixel) instead of just black and white.
The PalmPilot doesn't actually support grayscale drawing through
the PalmOS API. To get it to draw in gray you need to do quite a
bit of poking around in memory.
3Com has a
very nice article on their web site about this. The WabaVM sticks
to the supported features of PalmOS, doesn't write directly to
screen memory and doesn't set undocumented system registers.
So, it only supports 1 bit color drawing on the PalmPilot.
Due to popular demand, however, this is subject to change.
- I can't switch applications when I run a Waba application or the application doesn't seem to close normally.
What's going on?
This occurred under the Waba Beta 4 release when Waba programs were
run under the Palm Personal.
The problem occurs when a PalmOS program doesn't leave enough room in the
dynamic heap for the PalmOS launcher to work properly.
The default amount of memory allocated to a Waba program using the
WabaSDK Beta 4 and earlier was 12K.
Under the Palm Personal, this was enough to launch the program but not
enough to let the PalmOS launcher program switch programs.
The WabaVM Beta 6 and later tries to prevent this problem by
ensuring there is some dynamic memory (~2K) left for PalmOS
after a Waba progam starts up.
For reference, a Palm Personal has around 12K of dynamic heap. The
dynamic heap is where a Waba program puts its object heap,
native stack and VM stack.
A Palm Professional has 44K when sockets aren't used and 12K when they are
used (when the TCP/IP stack is active). A Palm III or IIIx device has
68K when sockets aren't used and 36K when they are used.
- Is there a bug drawing clipped lines under PalmOS?
Yes, PalmOS has an interesting bug that can show up when you draw clipped
lines.
If you have a clipping rectangle and you draw a line from somewhere in
the clipping rectangle to an area directly below the clipping rectangle
and it is not a vertical line, its right-left orientation may flip.
For example, if this what you want:
This is what you might get:
This only occurs when the line is not vertical and when the line ends
directly below the clipping rectangle.
- Is there a bug drawing using the DRAW_AND operation under PalmOS?
Yes, there is a bug in the PalmOS WinCopyRectangle() function which causes the DRAW_AND operation to produce incorrect results under some circumstances.
The following images demonstrate the problem. This is the result the AND operation should produce when copying a source to a destination:
and this is the actual result PalmOS gives when the scrAND operation is used with the PalmOS function WinCopyRectangle():
- Is there a bug in DRAW_XOR mode copyRect() on PalmOS?
PalmOS has a bug that shows up when you perform an overlapping copy
on a surface in XOR mode.
This will show up in Waba if you set the graphics drawing mode to
XOR and perform a copyRect() where:
- the source and destination surfaces are the same
- the source and destination regions overlap
- the destination is to the right of and lower than the source
Here is some C code that shows the problem under PalmOS:
RectangleType rect;
WinHandle winHandle;
winHandle = WinGetDrawWindow();
// draw a black rectangle in the center
rect.topLeft.x = 70;
rect.topLeft.y = 70;
rect.extent.x = 20;
rect.extent.y = 20;
WinDrawRectangle(&rect, 0);
// XOR the rectangle a little lower and to
// the right (overlapping)
WinCopyRectangle(winHandle, winHandle, &rect,
71, 71, scrXOR);
If you encounter this problem (you'll see strange lines drawn on the
screen), you can work around it by first copying the area into
an image buffer and then copying it back to the surface using XOR.
When I run Gremlins against a Waba program in the emulator, it gives me a Form error. Is this a bug?
This appears to be caused by a bug in Gremlins/PalmOS. The
problem does not appear if you run Gremlins in "Entire PalmOS
device" mode, it only appears if you run Gremlins against a specific
Waba program.
Waba programs on the PalmPilot are composed of a launcher (.prc file) and
classes (.pdb file). The launcher program starts up the WabaVM
and tells it where to find the classes and how much memory to use.
When Gremlins runs a Waba program, it runs the launch program and the
launch program runs the WabaVM. After switching to the WabaVM, the original
program is no longer active.
But Gremlins only knows about the launch program and it starts feeding
events to the inactive launch program. When it feeds an event
to popup the keyboard dialog (character 0x109), PalmOS appears to
become confused because the program that is supposed to pop up
the keyboard dialog is no longer active. This causes a Form error.
When run under "Entire PalmOS device" mode, this doesn't
happen because Gremlins doesn't feed events directly to the event
queue of the inactive program.
Copyright (c) 1999 - 2019 Wabasoft. Waba, WabaVM and WabaSDK are trademarks of
Wabasoft Inc.
|