Restore latest commit

This commit is contained in:
zilti 2017-12-12 01:05:27 +00:00
parent cc4adfe725
commit 73d5eb168e
3 changed files with 9 additions and 9 deletions

View file

@ -1,12 +1,11 @@
(defproject clojurefx/clojurefx "0.4.0" (defproject clojurefx/clojurefx "0.5.0-SNAPSHOT"
:description "A Clojure wrapper for JavaFX." :description "A Clojure wrapper for JavaFX."
:license "Like Clojure." :license "Like Clojure."
:url "https://www.bitbucket.org/zilti/clojurefx" :url "https://www.bitbucket.org/zilti/clojurefx"
:signing {:gpg-key "68484437"} :signing {:gpg-key "68484437"}
:dependencies [[org.clojure/clojure "1.9.0-RC2"] :dependencies [[org.clojure/clojure "1.9.0"]
[swiss-arrows "1.0.0"] [swiss-arrows "1.0.0"]
[camel-snake-kebab "0.4.0"] [camel-snake-kebab "0.4.0"]
[org.controlsfx/controlsfx "8.40.13"]
[com.taoensso/timbre "4.7.4" :exclusions [com.taoensso/carmine]] [com.taoensso/timbre "4.7.4" :exclusions [com.taoensso/carmine]]
[net.openhft/compiler "2.3.0"] [net.openhft/compiler "2.3.0"]
[org.ow2.asm/asm "6.0"] [org.ow2.asm/asm "6.0"]

View file

@ -6,7 +6,8 @@
[clojure.string :as str] [clojure.string :as str]
[swiss.arrows :refer :all]) [swiss.arrows :refer :all])
(:import (javafx.scene.layout Region) (:import (javafx.scene.layout Region)
(javafx.scene.shape Rectangle))) (javafx.scene.shape Rectangle)
(clojurefx.ApplicationInitializer)))
(timbre/refer-timbre) (timbre/refer-timbre)
@ -16,10 +17,8 @@
[interface args & code] [interface args & code]
(debug "interface:" interface) (debug "interface:" interface)
(let [iface-ref (reflect/type-reflect interface) (let [iface-ref (reflect/type-reflect interface)
bogus (debug "iface-ref:" iface-ref)
methods (filter #(instance? clojure.reflect.Method %) (:members iface-ref)) methods (filter #(instance? clojure.reflect.Method %) (:members iface-ref))
functional-method (filter (fn [x] (some #(= % :abstract) (:flags x))) methods) functional-method (filter (fn [x] (some #(= % :abstract) (:flags x))) methods)
bogus (debug "methods:" (pr-str functional-method))
method-sym (:name (first functional-method))] method-sym (:name (first functional-method))]
(debug "method-sym:" method-sym) (debug "method-sym:" method-sym)
@ -38,6 +37,9 @@
code (drop 2 fun)] code (drop 2 fun)]
`(.setValue (~(symbol (str (name obj) "/" (name prop)))) (fi javafx.event.ActionEvent ~argument ~@code)))) `(.setValue (~(symbol (str (name obj) "/" (name prop)))) (fi javafx.event.ActionEvent ~argument ~@code))))
(defn start-app [app-init app-start app-stop]
(clojurefx.ApplicationInitializer/initApp app-init app-start app-stop))
;; ## Data ;; ## Data
(def constructor-args (def constructor-args

View file

@ -28,7 +28,6 @@
(reduce conj imports))) (reduce conj imports)))
(defn qualify-class [imports class-str] (defn qualify-class [imports class-str]
(debug imports)
(let [classname (first (filter #(= class-str (last (str/split (pr-str %) #"\."))) imports)) (let [classname (first (filter #(= class-str (last (str/split (pr-str %) #"\."))) imports))
classfull (str/replace classname #"\." "/") classfull (str/replace classname #"\." "/")
classreal (str/split classfull #"\s")] classreal (str/split classfull #"\s")]