Skip to content

Commit 42795fa

Browse files
committed
Update docs
1 parent 1906131 commit 42795fa

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
# Cljfx dev tools
44

5-
Cljfx is a declarative, functional and extensible wrapper of JavaFX inspired by better parts of react and re-frame. Cljfx dev tools are a set of tools that can help with developing cljfx applications that should not be included into production distribution of the cljfx app.
5+
Cljfx is a declarative, functional and extensible wrapper of JavaFX inspired by better parts of react and re-frame. Cljfx dev tools are a set of tools that help with developing cljfx applications but should not be included into the production distribution of the cljfx app.
66

77
## Installation
88

9-
See latest version in Clojars
9+
See latest version on Clojars
1010

1111
## Requirements
1212

@@ -16,10 +16,21 @@ Cljfx dev tools require Java 11 or later.
1616

1717
### Props and types reference
1818

19-
If you don't remember the props required by some cljfx type, or if you don't know what even are the available types, you can use `cljfx.dev/help` to look up this information:
19+
If you don't remember the props required by some cljfx type, or if you don't know what are the available types, you can use `cljfx.dev/help` to look up this information:
2020

2121
```clojure
2222
(require 'cljfx.dev)
23+
24+
;; look up available types:
25+
(cljfx.dev/help)
26+
;; Available cljfx types:
27+
;; Cljfx type Instance class
28+
;; :accordion javafx.scene.control.Accordion
29+
;; :affine javafx.scene.transform.Affine
30+
;; ...etc
31+
32+
33+
2334
;; look up information about fx type:
2435
(cljfx.dev/help :label)
2536
;; Cljfx type:
@@ -32,7 +43,9 @@ If you don't remember the props required by some cljfx type, or if you don't kno
3243
;; :accessible-help string
3344
;; :accessible-role either of: :button, :check-box, :check-menu-item, :combo-box, :context-menu, :date-picker, :decrement-button, :hyperlink, :image-view, :increment-button, :list-item, :list-view, :menu, :menu-bar, :menu-button, :menu-item, :node, :page-item, :pagination, :parent, :password-field, :progress-indicator, :radio-button, :radio-menu-item, :scroll-bar, :scroll-pane, :slider, :spinner, :split-menu-button, :tab-item, :tab-pane, :table-cell, :table-column, :table-row, :table-view, :text, :text-area, :text-field, :thumb, :titled-pane, :toggle-button, :tool-bar, :tooltip, :tree-item, :tree-table-cell, :tree-table-row, :tree-table-view, :tree-view
3445
;; :accessible-role-description string
35-
;; ...etc.
46+
;; ...etc
47+
48+
3649

3750
;; look up information about a prop:
3851
(cljfx.dev/help :label :graphic)
@@ -50,12 +63,12 @@ If you don't remember the props required by some cljfx type, or if you don't kno
5063
;; :ambient-light javafx.scene.AmbientLight
5164
;; :anchor-pane javafx.scene.layout.AnchorPane
5265
;; :arc javafx.scene.shape.Arc
53-
;; ...
66+
;; ...etc
5467
```
5568

5669
### Improved error messages with spec
5770

58-
You can set custom type->lifecycle opt that will validate all cljfx component descriptions using spec and properly describes the error:
71+
You can set custom type->lifecycle opt that will validate all cljfx component descriptions using spec and properly describe the error:
5972

6073
```clojure
6174
;; suppose you have a simple app:
@@ -81,7 +94,7 @@ You can set custom type->lifecycle opt that will validate all cljfx component de
8194
(def renderer
8295
(fx/create-renderer
8396
:middleware (fx/wrap-map-desc #(assoc % :fx/type root-view))
84-
;; print errors in REPL's *err* output
97+
;; optional: print errors in REPL's *err* output
8598
:error-handler (bound-fn [^Throwable ex]
8699
(.printStackTrace ^Throwable ex *err*))
87100
:opts (cond-> {}

src/cljfx/dev.clj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,7 @@
344344
messages"
345345
(wrap-type->lifecycle (some-fn fx/keyword->lifecycle fx/fn->lifecycle)))
346346

347-
;; next steps:
348-
;; - release on clojars
349347
;; stretch goals
350348
;; - ui reference for searching the props/types/etc
351349
;; - dev cljfx type->lifecycle wrapper that adds inspector capabilities.
352-
;; - dev ui builder
353-
354-
(help :label :graphic)
350+
;; - dev ui builder

0 commit comments

Comments
 (0)