OVAL Frequently Asked Questions 

Contents 


1.How do I list all the fonts available to OVAL? 
2.Can I add my own fonts to OVAL? 
3.Can I open my address book using OVAL? 
4.Are there any problems doing this? 
5.My database is getting very big. What can I do about it? 
6.Can I avoid writing the Database creation code? 
7.How does the Serial control work? 
8.What do I need to ship with my OVAL program? 
9.When should I put brackets around my arguments and when not? 
10.My program Panics 60 when updating records. Why? 
11.My program Panics 55 when trying to open a dBase 3 database. Why? 
12.Where can I get hold of OVAL? 
13.Can I get a version of OVAL which will run on the Series 3a and Siena? 


------------------------------------------------------------------------

How do I list all the fonts available to OVAL? 

Try 


    For i = 0 To Screen.FontCount - 1
        Debug.Print Screen.Fonts(i)
    Next i



Can I add my own fonts to OVAL? 

Yes - put any fonts you want OVAL to load in any \fon\ directory.



Can I open my address book using OVAL? 

Yes.


    Dim DatDir As Database
    Dim DataTable As Table
    Set DatDir = OpenDataBase("m:\dat\")
    Set DataTable = DatDir.OpenTable("data")
    DataTable.MoveFirst
    While (DataTable.Eof = False)
        Debug.Print DataTable.Fields(0).Value
        DataTable.MoveNext
    Wend


Are there any problems doing this? 

Yes. The Data application keeps the file open when in use. if you run the above code when you
have the file DATA.DBF open, it will fail. 

My database is getting very big. What can I do about it? 

If you have an application that updates records in a database, you must periodically compact
your database to reduce the disk space it requires.


Dim i As Integer
On Error GoTo CompactErr
    For i = 0 To MyDB.TableDefs.Count - 1
        MyDB.CompactTable (MyDB.TableDefs(i).Name)
    Next i
    Exit Sub
CompactErr:
    MsgBox Error$
Exit Sub



Can I avoid writing the Database creation code? 

Yes - the application 'OVAL Database' that ships with OVAL can be used to create the databases
you want. You can also use it to view the databases you've created. (Try the Formula 1
database). 

How does the Serial control work? 

The OVAL serial control requires you to set it up by calling the ReadAsync method. Only then
will it receive OnCommRead events. After each read event you must call the ReadAsync method
again. Look at the OVSerial example to see how to use this control.


What do I need to ship with my OVAL program? 

You may notice that OVAL copies several files to the Psion before it runs your application.
Here is what they do:


OVGRID.DYL - Grid control
OVEXT2.DYL - Fixes a problem in the Choice list control 
OVEXT1.DYL - Fixes a problem in the Link Control 
OVSIBO2.DYL - Provides a Peekline method
OVDBG.DYL - Debugger
SYS$VDBG.IMG - Debugger server


You should not distribute the Debugger DYLs and you need only distribute the four extension
DYLs if you use them in your program. Additionally if your program uses the database functions
you should distribute the DBS patches.


When should I put brackets around arguments and when not? 

This is a peculiarity of VB syntax. Functions have brackets round the arguments and Sub
calls don't. So you can have:


        a = MsgBox ("Message Text",,"Title")
        MsgBox "Message Text",,"Title"


Of course you can have brackets round a single expression, so these two lines are really the
same Sub call:


        MsgBox "Message"
        MsgBox ("Message")


In fact the brackets do change things slightly - if you are passing values to user procedures
they are passed by reference unless you specify ByVal when you declare the procedure. If the
procedure is expecting two variables by reference then calling it using: 

        UserProc a,b


will pass a reference to both a and b. However, if you put brackets round a variable it turns it
into an expression and passes the result by value: 

        UserProc (a),b

so here a is passed by value and b by reference.

If you declared a user-defined function in VB3 you had to call it with the brackets and assign
the return value to something. In VB4 and in OVAL you don't have to assign the return value
of a function to a variable, but in that case you have to call the function without the
brackets:


        a = UserFunc ("one","two")
        UserFunc "one","two"


My program Panics 60 when updating records. Why? 

This is a known problem with the DBS server. To get round this problem, please install the
files:

SYS$DATA.CFG
ISAM3_01.DYL

in any \DBS directory on your Psion. These files should be in the DBSPATCH directory in your
OVAL directory.

You may redistribute these files with your OVAL application.


My program Panics 55 when trying to open a dBase 3 database. Why? 

This is a known problem with the DBS server. To get round this problem, please install the
files:

DBASE.DYL
SYS$DATA.CFG
ISAM3_01.DYL


in any \DBS directory on your Psion. These files should be in the DBSPATCH directory in your
OVAL directory.

You may redistribute these files with your OVAL application.


Where can I get hold of OVAL? 

The full version of OVAL is available from your local Psion distributor. You can also download a
demonstration version (fully working except that your projects are limited to two forms).


Can I get a version of OVAL which will run on the Series 3a and Siena? 

Unfortunately not. The run-time libraries required to run OVAL programs (which are present in
ROM on the Series 3c and version 2 Workabout) are too large to install in RAM, and would leave
virtually no space to run your application.

Comments and suggestions to Gareth-Richards@Psion.com

