The knoda scripting tutorial

Version Version 0.0.2
Last updated: 03/30/2004

Horst Knorr

knoda, or more exactly the hk_classes library, has an integrated python interpreter. For further information about python see http://www.python.org. This tutorial will not teach python, it will only show the hk_classes/python interface. This tutorial is by no means complete, it only exists now because the final documentation hasn't been written yet.

The examples in this tutorial are based on the tables as described in the knoda tutorial.


Table of Contents
1. The various actions
2. General object methods- the class hk_visible
3. Data sensitive methods
3.1. Objects of type hk_dsvisible - the class hk_datasource
3.2. Objects of type hk_dsdatavisible - the class hk_column
3.3. Objects of type hk_presentation - forms and reports
3.3.1. Handling forms
3.3.2. Handling reports
4. using hk_classes as a Python module
4.1. hk_drivermanager
4.2. hk_connection
4.3. hk_database
5. Tips and tricks
5.1. How to display the data
5.2. How to execute a query
5.3. How to create a table
5.4. How to create a calculated value field
5.5. How to define macros
List of Figures
2-1. Geometry specific methods
2-2. Look and Feel methods
2-3. Miscelleanous methods
2-4. Predefined colour names
3-1. hk_classes overview
3-2. description of the most important classes
3-3. hk_datasource methods
3-4. hk_column data methods
3-5. hk_column type methods
3-6. hk_dsdatavisible methods
3-7. Type casting
5-1. hk_column type methods
List of Examples
1-1. Hello world-program
2-1. Changing colour and position
3-1. rowposition
3-2. find a specific column
3-3. Read data
3-4. Write data
3-5. Search data
3-6. Read data
3-7. Write data
3-8. Search data
3-9. displaying a form
3-10. displaying a report
3-11. reportdata onprint
4-1. Python module basics
5-1. Show data
5-2. Execute a "SELECT" query
5-3. Execute an action query
5-4. create table
5-5. calculated values
5-6. Macro example
5-7. Macro example (part II)