Hi,
> (defmulti new-obj #(:_fenrir_class-name %))
You defined your function as #(:_fenrir_class-name %), so it will take
only one argument.
> However, when I call the multimethod with something like this:
>
> (new-obj fGameObject :location 'a-loc :sprite 'a-sprite)
>
> I get this error:
>
> 1:14
Hi,
> (defn y [a b] (+ a b))
> (def x '(y 1 2))
>
> (defn -main []
> (println (eval x)))
>
> which yields
>
> "Unable to resolve symbol: y in this context (NO_SOURCE_FILE:7)"
> etc.
> What am I missing?
The problem is namespace inside the function used by gen-class (and it
this case your -main
> Still I don't really understand WHY the gensym is called at different
> times. Is this a special case when you use genclass in a macro? Or
> should I be aware of other cases too?
What happens is that gen-class (and gen-interface) macroes don't
expand to anything (nil to be exact), but they have
Hi,
Try changing the name of your post-init function to something like
(symbol (str (name cname "-post-init"))), maybe your problem is that
gensym generates different symbols at runtime.
--
Krešimir Šojat
--
You received this message because you are subscribed to the Google
Groups "Clojure" gro
Hi,
> Any suggestions?
You can use (.substring s n), if n is larger than string length it
will return a empty string.
--
Krešimir Šojat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to th