This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This fn allows calling any method, as long as it's the first with that name in getDeclaredMethods(). | |
;; Works even when the arguments are primitive types. | |
(defn call-method | |
[obj method-name & args] | |
(let [m (first (filter (fn [x] (.. x getName (equals method-name))) | |
(.. obj getClass getDeclaredMethods)))] | |
(. m (setAccessible true)) | |
(. m (invoke obj (into-array Object args))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject saphograph "0.1.0" | |
:description "mentat network" | |
:url "" | |
:dependencies [[org.clojure/clojure "1.5.1"] | |
[org.clojure/clojurescript "0.0-2197"]] | |
:node-dependencies [] | |
:plugins [[lein-npm "0.4.0"] | |
[lein-cljsbuild "1.0.3"]] | |
:hooks [leiningen.cljsbuild] | |
:cljsbuild { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns select.core | |
(:require [om.core :as om :include-macros true] | |
[om.dom :as dom :include-macros true]) | |
(:import [goog.ui IdGenerator] ;; unique id goodness | |
)) | |
(defn guid [] | |
(.getNextUniqueId (.getInstance IdGenerator))) | |
(enable-console-print!) |