Hi,
I'm learning clojure-android using Emacs CIDER 0.8.1, neko 3.2.0.
The usual way for updating UI is evaluating the (set-content-view! (*a) (my-ui-def (*a)) using Ctrl+E, e.g.
(defactivity com.szymonkurylo.MainActivity
:key :main
:on-create
(fn [this bundle]
(keep-screen-on (*a))
(on-ui
(set-content-view! (*a)
(ui/make-ui (*a) (my-ui-def (*a)))))
))
Every time I use `this` instead of `(*a)` I get the following error:
Unable to resolve symbol: this in this context ...
The same error happens for example while defining :on-click callbacks, e.g.
(defn my-ui-def
[activity]
(concat [:linear-layout {:orientation :vertical}]
(map (fn [i]
[:button {:text (str i)
:on-click (fn [_] (toast activity (str "clicked " i)))}])
(range 10))))
Unable to resolve symbol: activity in this context
Is this my code error, or is it some CIDER issue with evaluating macros?