Skip to content

Commit

Permalink
Refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
dboris committed May 24, 2024
1 parent d2db79c commit 729be82
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ let () = main ()
The best way to get started is to peruse the sample programs and use them
as a starting template. Read the Apple documentation for the classes and methods
of interest. All books on iOS and macOS development in Objective-C are directly
applicable. Below is a short introduction to Camlkit.
applicable.


## Introduction
Expand All @@ -123,7 +123,7 @@ constructs by comparing the equivalent Objective-C and OCaml code.
NSString._class_ |> NSString.C.stringWithUTF8String "Hello"
new_string "Hello"
```
To print a NSString in utop: `myStr |> NSString._UTF8String |> print_string`
To print a NSString in utop: `myNSStr |> NSString._UTF8String |> print_string`

* Defining a new Cocoa class

Expand Down Expand Up @@ -154,8 +154,8 @@ constructs by comparing the equivalent Objective-C and OCaml code.
]
```

**_NOTE:_** If your method does not accept arguments, the `args` parameter
looks like this: `Define._method_ ~args: Objc_t.[] ...`
**_NOTE:_** If your method does not accept arguments, the `~args` parameter
looks like this: `Objc_t.[]`

* Memory management

Expand Down Expand Up @@ -199,7 +199,7 @@ Some usefull sources you may wish to examine include:

## Project status

The project is in active development but is still experimental. It can be
The project is in active development and is still experimental. It can be
considered at the alpha stage. If you are an early adopter, keep in mind
that the API is subject to change.

Expand Down
6 changes: 4 additions & 2 deletions camlkit-base.opam
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ depends: [
"ctypes-foreign" {>= "0.22.0"}
"alcotest" {with-test}
"odoc" {with-doc}
"conf-gnustep" {os != "macos"}
"conf-gnustep-base" {os != "macos"}
"conf-libobjc2" {os != "macos"}
"conf-clang" {os != "macos"}
]
available: arch = "arm64" | arch = "x86_64"
build: [
["dune" "subst"] {dev}
[
Expand All @@ -38,6 +40,6 @@ build: [
]
]
build-env: [
[CC = "clang"] {os != "macos"}
[CC = "clang"]
]
dev-repo: "git+https://github.com/dboris/camlkit.git"
4 changes: 2 additions & 2 deletions camlkit-gui.opam
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ bug-reports: "https://github.com/dboris/camlkit/issues"
depends: [
"dune" {>= "3.13"}
"camlkit-base" {= version}
"alcotest" {with-test}
"odoc" {with-doc}
"conf-gnustep-gui" {os != "macos"}
]
build: [
["dune" "subst"] {dev}
Expand All @@ -30,6 +30,6 @@ build: [
]
]
build-env: [
[CC = "clang"] {os != "macos"}
[CC = "clang"]
]
dev-repo: "git+https://github.com/dboris/camlkit.git"
2 changes: 1 addition & 1 deletion camlkit.opam
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ build: [
]
]
build-env: [
[CC = "clang"] {os != "macos"}
[CC = "clang"]
]
dev-repo: "git+https://github.com/dboris/camlkit.git"
3 changes: 1 addition & 2 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ the following Cocoa frameworks: Foundation, WebKit, Vision, CoreImage, and Photo
(synopsis "OCaml bindings to the AppKit framework")
(description "OCaml bindings to the AppKit framework")
(depends
(camlkit-base (= :version))
(alcotest :with-test))
(camlkit-base (= :version)))
(tags (objc bindings cocoa macos gnustep)))

(package
Expand Down

0 comments on commit 729be82

Please sign in to comment.