This is an example of an objective-C library wrapped by hand.

Library/              the objective-C library itself. 
ObjcApp/              a little app using the objective-C library.
WrappingLibrary/      the java wrapping of the library.
JavaApp/              an app written entirely in java and using the library.

Specific Info About This Example
================================

This example library uses the gnustep gui library to create a little
application with a single window and buttons in the window.  You can set an
object of your choice as the library delegate; when a button is pressed, the
library calls the method 'simpleGUIButtonPressed:' of the delegate passing
the tag of the button pressed as the argument.

Conclusion: in the java application, each time you press a button, you send
a method to a java object from inside objective-C code.  It is the java
method which prints 'Hello World 1' or 'Hello World 2' to the standard
output.

Warning: this example does not make any use of selector morphing, thus 
the selector morphing init code has been left out.  Have a look at the 
SimpleGUI-action example for the morphing init code.

Quick try of the example
========================

[Prerequisite: having compiled and installed JIGS, the GNUstep Java Interface]

(*) type 'make' in the top level directory.  All the parts should be
compiled.

(*) Go into ObjcApp/ and try the Objective-C application by typing

openapp SimpleApp.app

(*) Go in JavaApp/ and try the same application rewritten completely in Java 
by typing: 

./run

If "run" in JavaApp/ does not work, please try the full installation 
explained below.

Complete try of the example
===========================

Installing and running the example by following all the steps is a sort 
of quick tutorial on how the JIGS works.

[To install in your own ~/GNUstep rather than in the system-wide directory, 
which is a good idea with these test libraries, whenever you need to do a
make install, do it as follows: 

GNUSTEP_INSTALLATION_DOMAIN=USER make install

and without becoming root.]

(*) Compile and install the Objective-C library you want to wrap: go 
in Library/, type make, become root, type make install.  It is a good 
idea to have a quick look at the Objective-C library itself.

(*) Compile an example Objective-C app using the Objective-C library:
go in ObjcApp/, type make, then type openapp SimpleApp.app to try it.
It is a good idea to have a quick look at the code for the Objective-C
application.  [This step is not strictly required, and is included so 
that you can compare the objective-C application with the java one].

(*) Compile and install the wrapper for the library: go in
WrappingLibrary/, type make, then become root, then type make install.
A WrappingLibrary is composed of two parts: some java classes which
declare the classes and the methods which are exposed, and some
objective-C code which contains a native implementation of the exposed
methods.  [Optional: if you are interested in understanding how to write 
a library wrapper, read the source for the WrappingLibrary now].  The 
WrappingLibrary is composed of simple repetitive code which can be 
generated by a tool.  JIGS 0.1 does not yet have such a tool, but it will.

(*) Finally, compile and run the java application which uses the objective-C 
library through the WrappingLibrary: go in JavaApp/, type make, then type: 

CLASSPATH=./:$CLASSPATH java SimpleApp

(you don't need CLASSPATH=./:$CLASSPATH if ./ is already in your
CLASSPATH).  This should run the java application.  You may see the
magic now: the java application is entirely written in java, and
accesses the Objective-C library only through the
WrappingLibrary/Java/*.java classses, which are full java classes.
All the interfacing to Objective-C is now managed by the JIGS and by
the objective-C part of the WrappingLibrary.  It is very good idea now
to have a look at the java source of the java application, and perhaps
compare it with the objective-C source of the objective-C application.
