From 257f63fba485ac28923375923329f60610879ab9 Mon Sep 17 00:00:00 2001 From: "dziltener@lyrion.ch" Date: Sat, 14 Jan 2017 20:52:11 +0000 Subject: [PATCH] CamelCase fix --- README.md | 4 ++-- project.clj | 5 ++++- src/clojurefx/clojurefx.clj | 5 +++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index adb58a7..b6e21b5 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ [![License](//img.shields.io/badge/license-LGPL-blue.svg?style=flat)](https://www.gnu.org/licenses/lgpl-3.0.en.html#content) -[![Clojars](//img.shields.io/badge/clojars-0.0.20-blue.svg?style=flat)](https://clojars.org/clojurefx/versions/0.0.20) +[![Clojars](//img.shields.io/badge/clojars-0.0.21-blue.svg?style=flat)](https://clojars.org/clojurefx/versions/0.0.21) [![Gratipay](//img.shields.io/gratipay/zilti.svg?style=flat)](//gratipay.com/zilti) [![Flattr this](//api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=zilti&url=https%3A%2F%2Fbitbucket.org%2Fzilti%2Fclojurefx) # ClojureFX ```clojure -[clojurefx "0.0.20"] +[clojurefx "0.0.21"] ``` A Clojure extension to make working with [JavaFX](http://download.java.net/jdk8/jfxdocs/index.html) simpler and more idiomatic. It allows you to naturally work with stock JavaFX components through use of extended protocols. Should a feature be missing you can easily extend ClojureFX in your own codebase or just fall back to standard JavaFX methods. diff --git a/project.clj b/project.clj index 1b43791..d2f2e27 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,7 @@ -(defproject clojurefx "0.0.20" +(defproject clojurefx "0.0.21" + :description "A Clojure wrapper for JavaFX." + :license "Like Clojure." + :url "https://www.bitbucket.org/zilti/clojurefx" :dependencies [[org.clojure/clojure "1.8.0"] [swiss-arrows "1.0.0"] [com.taoensso/timbre "4.7.4" :exclusions [com.taoensso/carmine]] diff --git a/src/clojurefx/clojurefx.clj b/src/clojurefx/clojurefx.clj index d0fb62f..d84b8f9 100644 --- a/src/clojurefx/clojurefx.clj +++ b/src/clojurefx/clojurefx.clj @@ -33,7 +33,8 @@ javafx.stage.Stage {:style javafx.stage.StageStyle}})) (defn camelcase [kebabcase] - ) + (let [splitted (str/split kebabcase #"-")] + (reduce #(str %1 (str/capitalize %2)) (first splitted) (rest splitted)))) ;; ## Threading helpers @@ -96,7 +97,7 @@ ;; ## Properties (defn find-property [obj prop] - (clojure.lang.Reflector/invokeInstanceMethod obj prop [])) + (clojure.lang.Reflector/invokeInstanceMethod obj (str (camelcase prop) "Property") [])) (defn get-property-value ([obj prop]