ClojureScript function callbacks (aka. how to get this without (js* this))

2011-11-03 Thread olivergeorge
Hello, This must be obvious (pun unintended) but I'm struggling to work out how to define a callback function in clojurescript which has a local this variable. I see references to gthis in the compiler.clj but I'm unsure how to do define a function which uses it. Below is the javascript code

Re: ClojureScript function callbacks (aka. how to get this without (js* this))

2011-11-03 Thread David Nolen
Accessing this is supported via this-as https://github.com/clojure/clojurescript/commit/09ff093dc86b455e3090ce3612c5e01f3b5bada6 On Thu, Nov 3, 2011 at 1:51 AM, olivergeorge olivergeo...@gmail.com wrote: Hello, This must be obvious (pun unintended) but I'm struggling to work out how to

Re: ClojureScript function callbacks (aka. how to get this without (js* this))

2011-11-03 Thread Oliver George
Thanks David. That worked a treat. For anyone curious, I've added my working code below. ;; (ns drag (:require [goog.math :as math] [goog.fx :as fx] [goog.fx.Dragger :as Dragger] [goog.dom :as dom] [goog.style :as