Commits

camlspotter committed 3a8ad6e

readme

  • Participants
  • Parent commits 52b21e6
  • Branches dev

Comments (0)

Files changed (1)

 
       PyTuple_GET_ITEM => Tuple._GET_ITEM
 
- 
+OO Interface
+
+    OO style interface, OOApi.ml is now also provided. This module is automatically generated from api.ml.
+    See examples/testoo.ml for how to use.
+
+    - open Opycaml.OOApi at the beginning of your module
+
+    - The Api function calls like [Api.M.func m args] are in OO style in OOApi, [m#func args], if [m]'s an object of [M].
+
+    - If an Api function call [Api.M.func m args] has no trivial OO style translation, i.e. if [m] is not an object of [M], [OOApi.M.func] is available.
+    
+    - For example,
+
+        open Opycaml.Api
+
+        let _ = Base.initialize ()
+        ... Dict.getItemString dict "foobar" ...
+
+      becomes as follows in OO style:
+
+        open Opycaml.OOApi
+
+        let _ = Base.initialize ()           (* It has no trivial OO translation. *)
+        ... dict#getItemString "foobar" ...  
+
+Js_of_ocaml Interface
+
+    If you have js_of_ocaml installed, there is a small tool to use the syntax sugar of js_of_ocaml for Python dictionary access in OPyCaml. See js_of_ocaml directory.
+
+
+