Skip to content

Commit

Permalink
Add missing docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-yakushev committed Jul 5, 2013
1 parent 84b9733 commit ce0dbb2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/clojure/neko/ui.clj
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
;; ## Widget creation

(defn construct-element
"Constructs a UI widget by a given keyword. Infers a correct
constructor for the types of arguments being passed to it."
([kw context constructor-args]
(let [element-class (kw/classname kw)]
(.newInstance (reflect-constructor element-class
Expand All @@ -66,6 +68,9 @@
(to-array (cons context constructor-args))))))

(defn make-ui-element
"Creates a UI widget based on its keyword name, applies attributes
to it, then recursively create its subelements and add them to the
widget."
[context tree options]
(let [[widget-kw attributes & inside-elements] tree
_ (assert (and (keyword? widget-kw) (map? attributes)))
Expand Down

0 comments on commit ce0dbb2

Please sign in to comment.