Preparing next minor version

This commit is contained in:
Daniel Ziltener 2017-08-30 11:58:57 +00:00
parent e83575e97b
commit a5e7f42a26
3 changed files with 11 additions and 8 deletions

View file

@ -1,4 +1,4 @@
(defproject clojurefx/clojurefx "0.3.0"
(defproject clojurefx/clojurefx "0.3.1-SNAPSHOT"
:description "A Clojure wrapper for JavaFX."
:license "Like Clojure."
:url "https://www.bitbucket.org/zilti/clojurefx"
@ -10,8 +10,8 @@
[com.taoensso/timbre "4.7.4" :exclusions [com.taoensso/carmine]]
[net.openhft/compiler "2.3.0"]
[clojure-jsr-223 "0.1.0"]]
;; :profiles {:uberjar {:aot :all}}
:profiles {:test {:source-paths ["test"]
:resource-paths ["test-resources"]}}
:resource-paths ["test-resources"]}
:uberjar {:aot :all}}
:source-paths ["src"]
:java-source-paths ["src"])

View file

@ -20,12 +20,13 @@
(let [iface-ref (reflect/type-reflect interface)
bogus (debug "iface-ref:" iface-ref)
methods (filter #(instance? clojure.reflect.Method %) (:members iface-ref))
bogus (debug "methods:" (pr-str methods))
method-sym (:name (first methods))]
functional-method (filter (fn [x] (some #(= % :abstract) (:flags x))) methods)
bogus (debug "methods:" (pr-str functional-method))
method-sym (:name (first functional-method))]
(debug "method-sym:" method-sym)
(when-not (= (count methods) 1)
(throw (new Exception (str "can't take an interface with more than one method:" (pr-str methods)))))
(when-not (= (count functional-method) 1)
(throw (new Exception (str "can't take an interface with more than one method:" (pr-str functional-method)))))
(debug (pr-str `(proxy [~interface] []
(~method-sym ~args ~@code))))

View file

@ -106,7 +106,9 @@
;; Plumber
(defn gen-fx-controller-class [fxmlpath clj-fn]
(let [fxmlzip (zip-tree-seq (xml/parse (io/input-stream fxmlpath)))
(let [clj-fn (if (symbol? clj-fn)
(str (namespace clj-fn) "/" (name clj-fn)))
fxmlzip (zip-tree-seq (xml/parse (io/input-stream fxmlpath)))
clazz (get-controller-class fxmlzip)
[pkg classname] (reverse (map str/reverse (str/split (str/reverse clazz) #"\." 2)))
cljvec (str/split clj-fn #"/")]