If there are a unknown number of layouts you can just define a map from
keywords to layouts: {:x_axis BoxLayout/x_axis ..}
Otherwise using java reflection is another option.
Thanks,
Ambrose
On Thu, Mar 19, 2015 at 4:34 PM, Mark Bastian wrote:
> To provide a little more context, the problem I a
To provide a little more context, the problem I am trying to solve is this:
Often in Java I see constructors that have a pattern of (ClassName. X)
where X is some static integer value. For example, in Swing you build a Box
like so (Box. BoxLayout/X_AXIS). I want to simplify this by doing somethi
What problem are you trying to solve?
On Thu, Mar 19, 2015 at 12:49 PM, Mark Bastian
wrote:
> Hi All,
>
> I am trying to write a simple macro to resolve local symbols and I just
> can't seem to figure out the right invocation. Here are some commands you
> can type/paste in a repl:
>
> (def ONE 1
I don't have the answer (as I too am in the still-going-blind phase)
but the following might help:
- deref symbols to get their value
- http://learnxinyminutes.com/docs/clojure-macros/ (short and very helpful)
- http://www.braveclojure.com/writing-macros/ (long and very helpful)
- https://prag
Hi All,
I am trying to write a simple macro to resolve local symbols and I just
can't seem to figure out the right invocation. Here are some commands you
can type/paste in a repl:
(def ONE 1) ;define one
(def s1 (symbol "ONE")) ;get the symbol
(eval s1) ;evaluates to 1, no surprise
;My goal i